pythonレッスン後の練習問題7-10
573 ワード
7-10夢のリゾート:ユーザーの夢のリゾートを調査するプログラムを作成します.「If you could visit one place in the world,where would you go?」のようなヒントを使用して、調査結果を印刷するコードブロックを作成します.
info={}
active=True
while active:
name=input("Hi, what's your name? ")
place=input("If you could visit one place in the world, where would you go? ")
info[name]=place
repeat=input("anyone else?(yes/no) ")
if repeat=='no':
active=False
print("
------ poll result ------
")
for name,place in info.items():
print(name+ " would visit "+ place)