[Python-Dev] problem with python 3.1 (original) (raw)
Benjamin Peterson benjamin at python.org
Thu Sep 16 02:58:01 CEST 2010
- Previous message: [Python-Dev] problem with python 3.1
- Next message: [Python-Dev] standards for distribution names
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
This list is for the development of Python, not questions about its use. You should ask python-list. None the less, it's because input() changed between Python 2 and 3. Look at the docs for both.
2010/9/15 João Vitor <johnvmo at hotmail.com>:
I made a program that, according to my teacher, is correct but is not running properly. The program is really simple: import math x = input ("Coloque o valor do primeiro cateto:") y = input ("Coloque o valor do segundo cateto:") z = x**2 w = y**2 soma = z + w h = 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 z = x**2 TypeError: 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?
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/benjamin%40python.org
-- Regards, Benjamin
- Previous message: [Python-Dev] problem with python 3.1
- Next message: [Python-Dev] standards for distribution names
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]