Δημοσιεύτηκε: 05 Μαρ 2009, 18:23
από panagiotispoyls
τώρα το μνμ λάθους λέει ότι δεν υποστηρίζει την ύψωση σε int k float , μαλλον;
Κώδικας: Επιλογή όλων
GRAPSTE TO BAROS SAS : 120
GRAPSTE TO YPSOS SAS : 210
Traceback (most recent call last):
File "dms.py", line 16, in <module>
dms = baros / ypsos ^2
TypeError: unsupported operand type(s) for ^: 'float' and 'int'


τ προγραμμα είναι
Κώδικας: Επιλογή όλων
import math

baros = float(raw_input("GRAPSTE TO BAROS SAS : "))

ypsos = float(raw_input("GRAPSTE TO YPSOS SAS : "))

math.pow(ypsos, 2)
dms = baros / ypsos ^2

print " o deikths sas einai", dms

ευχαριστω madlgeek ;)