Untitled
user_0100208
plain_text
2 years ago
1.5 kB
4
Indexable
#Q1 while True: print("Q1: 您覺得這家酒吧的氣氛適合?") print("a.派對 b.聚會 c.約會 d.單人行 e.以上皆是") x=input() try: if x != "a" and x !="b" and x !="c" and x !="d" and x !="e": raise KeyboardInterrupt except KeyboardInterrupt: print ("Error! 請輸入a,b,c,d,e") else: break #Q2 while True: print("Q2: 您覺得這家酒吧的價位如何?") print("a.很貴 b.偏貴 c.普通 d.便宜 e.超便宜") x=input() try: if x != "a" and x !="b" and x !="c" and x !="d" and x !="e": raise KeyboardInterrupt except KeyboardInterrupt: print ("Error! 請輸入a,b,c,d,e") else: break #Q3 while True: print("Q3: 您覺得這家酒吧的食物如何?") print("a.整體來說都很好吃 b.某些食物很好吃 c.整體來說都很普通 d.某些食物很難吃 e.整體來說都很難吃") x=input() try: if x != "a" and x !="b" and x !="c" and x !="d" and x !="e": raise KeyboardInterrupt except KeyboardInterrupt: print ("Error! 請輸入a,b,c,d,e") else: break #Q4 while True: print("Q4: 您會多推薦這間酒吧給你認識的人?") print("a.非常推薦 b.推薦 c.沒意見 d.不推薦 e.非常不推薦") x=input() try: if x != "a" and x !="b" and x !="c" and x !="d" and x !="e": raise KeyboardInterrupt except KeyboardInterrupt: print ("Error! 請輸入a,b,c,d,e") else: break print("感謝您的回饋!")
Editor is loading...