第七章作业
2018-04-02 08:33
204 查看
#7-2 info=input("how many people do you have dinner with?\n") num=int(info) if num>8: print("i am sorry that no table is left.\n") else: print("ok,there is a empty table.\n") #7-3 info=input("input a number, i will tell you something\n") if (int(info)%10==0): print(info+" is integral multiple of 10.\n") else: print(info+" is not integral multiple of 10.\n") #7--5 while True: info=input("tell me your age and i will tell you ticket price, or input 'quit' to quit\n") if (info=='quit'): break elif int(info)<3: print("you don't have to pay for it.\n") elif int(info)<=12: print("you must pay 10 dollars for your ticket.\n") else: print("you must pay 15 dollars for your ticket.\n") # 7-10 places=[] while True: info=input("If you could visit one place in the world,where would you go?(input'quit' to quit)\n") if (info=='quit'): break else: places.append(info) print(places)
相关文章推荐
- 第七章作业
- Python第七章课后作业
- 第七章作业3
- 家庭作业(第二章、第三章、第七章、第八章)
- JavaScript第七章课后作业
- 操作系统 第七章 作业管理
- RFID第七章作业——物联网1122-08黄炜彬
- 《高级编程技术》作业[7]——第七章部分习题选做
- 【RFID第四次作业】第七章课后习题
- 《Java数据结构和算法》第二版 Robert lafore 编程作业 第七章
- 第七章作业
- 第七章课后作业
- Python编程:从入门到实践 第七章作业解答
- 第七章作业
- 20131006国庆作业第七章例7-1,7-2,7-3
- 高级编程 python 第七章作业
- 第七章 数组 课后作业:
- 【第四周】第七章作业
- LDD 第七章 学习要点和作业
- 第五次作业(第七章)