[Python-Dev] problem with python 3.1

João Vitor johnvmo at hotmail.com
Thu Sep 16 02:17:39 CEST 2010


I made a program that, according to my teacher, is correct but is not running properly.The program is really simple:
import mathx = input ("Coloque o valor do primeiro cateto:")y = input ("Coloque o valor do segundo cateto:")z = x**2w = y**2soma = z + wh = math.sqrt (soma)print = "O valor da hipotenusa é:", h
But after I put the value of x and y this error appears:
Traceback (most recent call last):  File "C:/lista03.py", line 4, in <module>    z = x**2TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'
My teacher said the program ran normally in his computer, but in my it doesn't!why? 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20100916/8125c01f/attachment.html>


More information about the Python-Dev mailing list