Using ‘Dictionary’ in Python I wrote the codes using PyCharm.
But you can easily run this on your Android phone! Just download and use Pydroid 3
Let me know if you have any comments!
v1 = “””Hotel
a. das Hotel
b. die Hotel
c. der Hotel
“”” # “”” will ensure the info is given in three lines
v2 = “””Airport
a. das Flughafen
b. der Flughafen
c. die Flughafen
“””
v3 = “””Railway Station
a. das Bahnhof
b. der Bahnhof
c. die Bahnhof
“””
v4 = “””Railway Platform
a. das Bahnsteig
b. der Bahnsteig
c. die Bahnsteig
“””
v5 = “””Train
a. das Zug
b. der Zug
c. die Zug
“””
v6 = “””Customs
a. das Zoll
b. der Zoll
c. die Zoll
“””
v7 = “””Immigration
a. das Einwanderung
b. der Einwanderung
c. die Einwanderung
“””
v8 = “””Taxi
a. das Taxi
b. der Taxi
c. die Taxi
“””
v9 = “””Downtown
a. das Innenstadt
b. der Innenstadt
c. die Innenstadt
“””
v10= “””Street
a. das Straße
b. der Straße
c. die Straße
“””
articles={v1:”a”, v2:”b”, v3:”b”, v4:”b”, v5:”b”, v6:”b”, v7:”c”, v8:”a”, v9:”c”, v10:”c”}
name=input(“What is your name? : “)
print(“Hello “, name, “, Select the correct article for the given word!”)
score=0
for i in articles:
print(i)
flag1=input(“Do you want to skip (y/n): “)
print(name, “, Your Final Score = “,score)
while flag1 != "y" and flag1 != "n": #!= means 'not equal to'
print("Wrong input you can only type y or n")
print(i)
flag1=input("Do you want to skip (y/n): ")
if flag1=="y":
continue
ans = input ("Choose the correct article (a/b/c): ")
if ans == articles[i]:
print("Good, you got it right! +1 point ")
score = score + 1
print (name,"your current score is: ",score)
print("Now try the next!")
print("\n")# line gap
else:
print("Sorry wrong answer, you lost 1 point ")
score = score - 1
print (name,"your current score is: ",score)
print("Now try the next!")
flag2=input("Do you want to quit? (y/n): ")
if flag2=="y":
break
print("\n")# line gap