Multiplikations (tabelle)
Verfasst: Freitag 7. September 2007, 18:05
warum findet hier keine Multiplikation von x statt sondern nur eine Ausgabe (siehe unten) wenn ich z.B. 5 eingebe
Bitte Zahl eingeben: 5
5 55 555 5555 55555
Edit (BlackJack): Code in Codetags gesetzt.
Code: Alles auswählen
#!/usr/bin/python
print
x = raw_input ("Bitte Zahl eingeben: ")
def multiplikation (x):
i = 1
while i < 6:
y = i * x
print y, "\t" ,
i = i + 1
multiplikation (x)
print
5 55 555 5555 55555
Edit (BlackJack): Code in Codetags gesetzt.