学艺不精,前来献丑,请广大网友指正【总感觉最后一行continue好像有点多余呢,因为第一行的True代表了它永远不会在while的时候判断为False跳出循环】
while True: print("Welcome! How many people, please?\nEnter 'quit' to end the program.") i = input() if i=='quit': break elif int(i)<=4: print('Your small table is reserved!') elif 4<int(i)<=6: print('Your middle table is reserved!') elif 6<int(i)<=10: print('Your large table is reserved!') elif int(i)>10: print('Sorry, there is no free table that seats over ten persons.') continue