这是一个模仿摇骰子游戏,猜大小,三个骰子,随机出现三个数1~6,每个骰子正面朝上的点数相加,3-10为小,11-18为大,赌徒的初始赌金为1000,赌注可以由自己决定。猜中了,就会在原来的基础上获得赌注的金钱,猜错了,就在原来的金额上减去赌注。如果各位发现这些程序有什么bug,欢迎给我留言。
# import random
# def roll_dice(number = 3,points = None):
# print('<<<<<<< ROLL THE DICE! >>>>>>')
# if points is None:
# points = []
# while number>0:
# point = random.randrange(1,7)
# points.append(point)
# number = number-1
# return points
# def roll_result(total):
# isBig = 11<= total <= 18
# isSmall = 3<= total <=10
# if isBig:
# return 'Big'
# elif isSmall:
# return 'Small'
# def start_game(balance=1000):
# print('<<<<<<<< GAME START! >>>>>')
# choic