编写一个程序,调查用户梦想的度假胜地。使用类似于“If you could visit one placein the world, where would you go?”的提示,并编写一个打印调查 结果的代码块。
places = {}
active = True
while active:
name = input("\nPlease input your name:")
place = input('If you could visit one place in the world, where would you go?')
places[name] = place
repeat = input("If there are any people to answer this problem?(yes/no)")
if repeat == 'no':
active = False
print("\n")
for name, place in places.items():
print(name.title()+" would like to go to "+place)