题解 | #取号#

取号

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.')
        
全部评论

相关推荐

10-30 10:16
南京大学 Java
龚至诚:给南大✌️跪了
点赞 评论 收藏
分享
在努力的外卷侠很靠谱:怎么,大家都没保底吗?我这美团已经入职了,不说了,系统派单了。
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务