Commit 33d7d390 by BellCodeEditor

save project

parent 333e981d
import random
import random
p=input("出什么,快快快 ")
print("玩家: "+p)
print("计算机:"+"我也不出")
print("恭喜,你赢!")
\ No newline at end of file
import random
import random
p=input("出什么,快快快 ")
print("玩家出拳: "+p)
o=["石头","剪刀","布"]
c=random.choice(o)
print("计算机出拳:"+c)
if p in o:
if p==c:
print("平局!")
elif p=="石头" and c=="剪刀" or p=="剪刀" and c=="布" or p=="布" and c=="石头":
print("恭喜,你赢!")
else:
print("很遗憾,你输了!")
else:
print("输入有误,请重来!")
\ No newline at end of file
import random
import random
......@@ -10,6 +10,6 @@ if p==c:
elif p=="石头" and c=="剪刀" or p=="剪刀" and c=="布" or p=="布" and c=="石头":
print("恭喜,你赢!")
elif p=="剪刀" and c=="石头" or p=="布" and c=="剪刀" or p=="石头" and c=="布":
print("恭喜计算机胜!")
print("很遗憾,你输了!")
else:
print("输入有误,请重来!")
\ No newline at end of file
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