题解 | #取号#

取号

http://www.nowcoder.com/practice/2a61684ea405441eb9e572705defebdc

while True:
    a = input("Welcome! How many people, please?\nEnter 'quit' to end the program.\n") 
    if a == 'quit':
        break
    if not int(a):
        continue
    elif int(a) not in range(1,21):
        continue
    elif int(a) <=4 :
        print('Your small table is reserved!')
    elif int(a) > 4 and int(a) <=6:
        print('Your middle table is reserved!')
    elif int(a) > 6 and int(a) <=10:
        print('Your large table is reserved!')
    else:
        print('Sorry, there is no free table that seats over ten persons.')
        
全部评论

相关推荐

07-01 19:00
门头沟学院 Java
点赞 评论 收藏
分享
后来123321:别着急,我学院本大二,投了1100份,两个面试,其中一个还是我去线下招聘会投的简历,有时候这东西也得看运气
无实习如何秋招上岸
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务