在线棋牌游戏用python编一个扔骰子猜大小的游戏
来源:http://lehu6677.com 作者:在线棋牌游戏
搜集的资料: import random def game(w, l): def winning(): print("You are right.") again(w+1, l) def losing(): print("You are wrong.") again(w, l+1) def again(w, l): ans = input("Play again?(y/n)") if ans == n: print("You played %s rounds, and you won %s rounds" % (w+l, w)) elif ans == y: game(w, l) else: again(w, l) guess = input("Please input your guess(big/small): ") dice = random.randrange(1, 7) if guess == "small": winning() if dice <= 3 else losing() elif guess == "big": winning() if dice >= 4 else losing() else: game(w, l) if __name__ == __main__: game(0, 0) |
在线棋牌游戏的相关游戏攻略文章
- 10-27在线棋牌游戏森林舞会游戏怎样下载
- 10-27在线棋牌游戏用python编一个扔骰子猜
- 10-27在线棋牌游戏麻将机价格在什么一般
- 10-13在线棋牌游戏我不会打麻将男友妈妈
- 10-13在线棋牌游戏北京麻将推筒子技巧
- 10-13在线棋牌游戏曝光博彩菠菜业的内幕