当前位置: 代码迷 >> 综合 >> python编程---example5
  详细解决方案

python编程---example5

热度:48   发布时间:2023-10-18 11:42:21.0

编写一个python脚本,输出你想要去的地方。

place = {}active = Truewhile active:name = input("\nWhat is your name? ")visit = input("If you could visit one place in the world, where would you go? ")place[name] = visitrepeat = input("Would you like to let another person respond?(yes/no) ")if repeat == 'no':active = Falseprint("\n--- Poll Results ---")
for name,visit in place.items():print(name + " could like to visit " + visit + ".")print()

 

  相关解决方案