ich bin mit Python noch so zihmlich am anfang (mit den anderen Programmier sprachen auch)
und mien vokabeltreiner hat viel zu viel text für diese wenige funktion

naja noobie halt ^^
Code: Alles auswählen
# vokabeltrainer.py ver 0.3.0 beta
e = raw_input('Wie viele vokabeln: ')
def vok1():
print ' again '
v1 = raw_input('auf deutsch: ')
if v1 == 'wieder':
print ' Richtig '
else:
print ' Falsch '
print ' '
print 'Richtig waere: wieder '
print ' '
def vok2():
print ' almost '
v2 = raw_input('auf deutsch: ')
if v2 == 'fast' :
print 'Richtig'
elif v2 == 'beinahe':
print ' Richtig '
else:
print ' Falsch '
print ' '
print 'Richtig waere: fast oder beinahe '
print ' '
def vok3():
print ' '
print ' always '
v3 = raw_input('auf deutsch: ')
if v3 == 'immer':
print ' Richtig '
else:
print ' Falsch '
print ' '
print 'Richtig waere: immer '
print ' '
def vok4():
print ' '
print ' cake '
v4 = raw_input('auf deutsch: ')
if v4 == 'Kuchen':
print ' Richtig '
else:
print ' Falsch '
print ' '
print 'Richtig waere: Kuchen '
print ' '
def vok5():
print ' '
print ' free '
v5 = raw_input('auf deutsch: ')
if v5 == 'Frei':
print ' Richtig '
elif v5 == 'umsonst':
print ' Richtig '
elif v5 == 'befreien':
print 'Richtig '
else:
print ' Falsch '
print ' '
print 'Richtig waere: Frei , umsonst oder befreien '
print ' '
def vok6():
print ' '
print ' hair '
v6 = raw_input('auf deutsch: ')
if v6 == 'Haare':
print ' Richtig '
else:
print ' Falsch '
print ' '
print 'Richtig waere: Haare '
print ' '
def vok7():
print ' '
print ' morning '
v7 = raw_input('auf deutsch: ')
if v7 == 'Morgen':
print ' Richtig '
else:
print ' Falsch '
print ' '
print 'Richtig waere: Morgen '
print ' '
def vok8():
print ' '
print ' now '
v8 = raw_input('auf deutsch: ')
if v8 == 'jetzt' :
print 'richtig'
elif v8 == 'da':
print ' Richtig '
else:
print ' Falsch '
print ' '
print 'Richtig waere: jetzt oder da '
print ' '
def vok9():
print ' '
print ' rush '
v9 = raw_input('auf deutsch: ')
if v9 == 'Eile':
print 'RIchtig'
elif v9 == 'Hetze':
print 'Richtig'
elif v9 == 'eilen':
print ' Richtig '
else:
print ' Falsch '
print ' '
print 'Richtig waere: Eile , Hetze oder eilen '
print ' '
def vok10():
print ' '
print ' map '
v10 = raw_input('auf deutsch: ')
if v10 == 'Karte':
print ' Richtig '
else:
print ' Falsch '
print ' '
print 'Richtig waere: Karte '
print ' '
if e == '1':
vok1()
elif e == '2':
vok1() , vok2()
elif e == '3':
vok1() , vok2() , vok3()
elif e == '4':
vok1() , vok2() , vok3() , vok4()
elif e == '5':
vok1() , vok2() , vok3() , vok4() , vok5()
elif e == '6':
vok1() , vok2() , vok3() , vok4() , vok5() , vok6()
elif e == '7':
vok1() , vok2() , vok3() , vok4() , vok5() , vok6() , vok7()
elif e == '8':
vok1() , vok2() , vok3() , vok4() , vok5() , vok6() , vok7() , vok8()
elif e == '9':
vok1() , vok2() , vok3() , vok4() , vok5() , vok6() , vok7() , vok8() , vok9()
elif e == '10':
vok1() , vok2() , vok3() , vok4() , vok5() , vok6() , vok7() , vok8() , vok9() , vok10()
else:
print 'zu viele oder keine zahl'
a = raw_input('um zu beenden OK Druecken')
print a