26 lines
414 B
Python
26 lines
414 B
Python
|
hauptstädte = {}
|
||
|
|
||
|
print("** Datenerfassung **")
|
||
|
|
||
|
while True:
|
||
|
print("Bitte Land eingeben")
|
||
|
land = input()
|
||
|
if land == "":
|
||
|
break
|
||
|
print("Bitte Stadt eingaben")
|
||
|
stadt = input()
|
||
|
hauptstädte[land] = stadt
|
||
|
|
||
|
print("** Datenabfrage **")
|
||
|
|
||
|
while True:
|
||
|
print("Bitte Land eingeben")
|
||
|
land = input()
|
||
|
if land == "":
|
||
|
break
|
||
|
if land in hauptstädte:
|
||
|
print(hauptstädte[land])
|
||
|
else:
|
||
|
print("Land existiert nicht")
|
||
|
|