题解 | #取号#

取号

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 a.isnumeric():
        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.')
        
        
全部评论

相关推荐

字节 飞书绩效团队 (n+2) * 15 + 1k * 12 + 1w
点赞 评论 收藏
分享
11-02 09:49
已编辑
货拉拉_测试(实习员工)
热爱生活的仰泳鲈鱼求你们别卷了:没事楼主,有反转查看图片
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务