Code: Alles auswählen
for i in range(15,35,5):
print( i,"inch = ",*2.54 ,"cm")
Wenn ich die Kommas und die Kommentare entferne funktioniert das Pr0gramm aber.
Code: Alles auswählen
for i in range(15,35,5):
print( i,"inch = ",*2.54 ,"cm")
Du meinst die Strings‽gaganaut hat geschrieben: Wenn ich die Kommas und die Kommentare entferne funktioniert das Pr0gramm aber.
Code: Alles auswählen
print(i, "inch = ", i*2.54, "cm")
Code: Alles auswählen
print("{inch} inch = {cm} cm".format(inch=i, cm=i*2.54))