猜数字的大小游戏 C:\Users\Administrator>python Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >…
#Filename:game1.py guess=10 running=True while running: try: answer=int(raw_input('Guess what i think:')) except: print 'Please input interga\n' continue if answer<guess: print 'Your answer is too small\n' continue elif answer>guess: print 'Your ans…
#游戏开始,首先玩家选择大小,选择完成后开始摇骰子(11<=总值<=18为大,3<=总值<=10为小) import random def roll_dice(numbers=3,points=None): # 创建3个筛子numbers,创建点数points print('<<<<roll the dice!>>>>') if points is None: points = [] # 把点数放到一个空的列表里 while numb…