题解 | #牛牛的抽奖游戏#

牛牛的抽奖游戏

https://www.nowcoder.com/practice/9c9300f7ecbb41f49c3e8727b4948038

n=int(input())
while n>=0:
    if n==3:
        print('Congratulations!')
        break  
    else:
         n = int(input()) ## Update the value of 'n' inside the loop to terminate it
else:
    print('Give up!') #while else里套了一个if else

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务