|
发表于 2017-4-27 15:35:19
|
显示全部楼层
领鱼币了
- # -*- coding: utf-8 -*-
- import random
- computer = random.randint(1, 3)
- c=int(computer)
- a=1
- print("游戏开始啦~~~~~\n")
- print("-------------------------小宏最帅------------------------")
- while (a==1):
- people = input('1是剪子,2是石头,3是布\n请输入数字:')
- p=int(people)
-
- if(p>c):
- if(p==3 and c==1):
- print("Sorry YOU LOSE")
- else:
- print("Great YOU WIN~")
- elif(p<c):
- if(p==1 and c==3):
- print("Great YOU WIN")
- else:
- print("Sorry YOU LOSE")
- else:
- print("TIE")
-
- if (c==1):
- print("电脑出的是:1剪刀")
- elif(c==2):
- print("电脑出的是:2石头")
- else:
- print("电脑出的是:3布")
- inputa=input("继续请安:1,退出请安:0\n")
- a=int(inputa)
- computer = random.randint(1, 3)
- c=int(computer)
- print("~~~~GAME OVER~~~")
- print("~~~~~Goodbye~~~~")
-
复制代码 |
评分
-
查看全部评分
|