Commit 71fad717 by BellCodeEditor

save project

parent e2f894dc
Showing with 13 additions and 4 deletions
...@@ -2,7 +2,15 @@ sdrg=input("请出拳(石头/剪刀/布):") ...@@ -2,7 +2,15 @@ sdrg=input("请出拳(石头/剪刀/布):")
print("玩家出拳:"+sdrg) print("玩家出拳:"+sdrg)
import random import random
yyyyy=["石头","剪刀","布"] yyyyy=["石头","剪刀","布"]
e=random.choice(yyyyy) eeeeeeeeeee=random.choice(yyyyy)
print("计算机出拳:"+e) print("计算机出拳:"+eeeeeeeeeee)
if sdrg==eeeeeeeeeee:
print("平局")
elif sdrg=="石头" and eeeeeeeeeee=="剪刀":
print("sdrg胜利")
elif sdrg=="剪刀" and eeeeeeeeeee=="布":
print("sdrg胜利")
elif sdrg=="布" and eeeeeeeeeee=="石头":
print("sdrg胜利")
else:
print("eeeeeeeeeee胜利")
\ 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