Commit 4020844f by BellCodeEditor

save project

parent dfe4f9b1
Showing with 13 additions and 0 deletions
import random
#等待玩家输入
playerpls = raw_input("请输入:剪刀(0) 石头(1) 布(2):")
player = int(playerpls)
#电脑
ubuntu = random.randint(0,2)
#判断输赢
if (player == 0 and ubuntu == 2) or (player == 1 and ubuntu == 0) or (player == 2 and ubuntu == 1):
print("恭喜你,你赢了")
elif ubuntu==player:
print("平局,不要走,决战到天亮")
else:
print("你输了,洗洗手,再战")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment