题解 | #牛牛的抽奖游戏#
牛牛的抽奖游戏
https://www.nowcoder.com/practice/9c9300f7ecbb41f49c3e8727b4948038
number_guess=int(input())#输入 lucky_number=3 flag=True while flag: if number_guess<0:#判断输入是否是负数,若是,则跳出循环 flag =False print('Give up!') break else: if number_guess!=lucky_number:#不是负数的情况下继续让用户输入,然后继续判断 number_guess=int(input()) if number_guess<0: print('Give up!') break#若再次输入的是负数,跳出循环 else: flag=False print("Congratulations!") break