python课后习题 7-10
2019-03-24 15:48
169 查看
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("\n------ poll result ------\n") for name,place in info.items(): print(name+ " would visit "+ place)
相关文章推荐
- python课后习题 10-8
- python课后习题 10-2
- python课后习题 10-4
- Python学习笔记(六)——小甲鱼Python3第二十一讲课后习题与笔记
- python第一章课后习题
- Python核心编程 第五章 课后习题
- 可爱的python课后习题
- 小甲鱼零基础学Python课后习题第25课
- Python课本第二章课后习题选做
- Python 从入门到实践 5-8 课后习题
- Python 从入门到实践 8-9 课后习题
- python第二章课后习题
- 小甲鱼python零基础课后习题010列表:一个打了激素的数组01
- Python 从入门到实践 8-6 课后习题
- Python课本第三章课后习题选做
- Accelerated C++ 课后习题5-10,回文查找
- Python编程:从入门到实践(课后习题1)
- Python编程:从入门到实践(课后习题3)
- 小甲鱼python零基础课后习题001我和Python的第一次亲密接触
- 小甲鱼python零基础课后习题012列表:一个打了激素的数组03