Dieser Quelltext:
Code: Alles auswählen
def spezialaktion(stufea, stufev):
print "Spezialaktion auswählen!"
print "1 = Inva; 2 = Sabo; 3 = Plünder; 4 = Spio; 5 = Kolo"
aktion = input(">>> ")
# Inva
if aktion == 1:
grundwert = "24"
# Sabo
elif aktion == 2:
grundwert = "2"
# Plünder
elif aktion == 3:
grundwert = "1"
# Spio
elif aktion == 4:
grundwert = "0,5"
# Kolo
elif aktion == 5:
grundwert = "37"
# Error
else:
grundwert = "0"
if grundwert != "0":
ergebniss = 0,91 ** stufea * 1,11 ** stufev * grundwert
print round(ergebniss, 2) + " Stunden"
spezialaktion(10, 10)
Code: Alles auswählen
Traceback (most recent call last):
File "H:/xZone/snRechner.py", line 34, in -toplevel-
spezialaktion(10, 10)
File "H:/xZone/snRechner.py", line 31, in spezialaktion
ergebniss = 0,91 ** stufea * 1,11 ** stufev * grundwert
OverflowError: long int too large to convert to int
Greetz
xStream