Jul-20-2018, 12:24 AM
(This post was last modified: Jul-20-2018, 12:24 AM by pistacheoowalnuttanker.)
Hello, I am completely new to Python and I was following a tutorial on Python 3 using Jupyiter notebook when I got the error bellow ***
---------------------------------------------------------------------------
TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'
I have exactly what is in the video and it worked for him, I can't find the reason it is giving me this error. I have tried clearing the kernal, restarting Jupyiter, trying to isolate the problem like seen below
---------------------------------------
It comes up with the same error, what is the problem with this line of code? Thanks, Mike.
---------------------------------------------------------------------------
1 2 3 4 5 6 7 |
TypeError Traceback (most recent call last) <ipython - input - 39 - 8ab96e18e533 > in <module>() 3 weight_kg = "155" 4 - - - - > 5 bmi = weight_kg / (height_m * * 2 ) 6 print ( "bmi: " ) 7 print (bmi) |
I have exactly what is in the video and it worked for him, I can't find the reason it is giving me this error. I have tried clearing the kernal, restarting Jupyiter, trying to isolate the problem like seen below
---------------------------------------
1 2 |
height_m = "2" bmi = (height_m * * 2 ) |