Commit 3d4a1012 by BellCodeEditor

save project

parent 1d745e69
Showing with 8 additions and 2 deletions
...@@ -4,4 +4,10 @@ blsk=input("出拳(石头/剪刀/布)") ...@@ -4,4 +4,10 @@ blsk=input("出拳(石头/剪刀/布)")
print("我出"+blsk) print("我出"+blsk)
list = ["石头","剪刀","布"] list = ["石头","剪刀","布"]
cmputer = random.choice(list) cmputer = random.choice(list)
print("电脑出"+cmputer) print("电脑出"+cmputer)
\ No newline at end of file if blsk == cmputer:
print("平局")
elif (blsk == "布" and cmputer == "石头") or (blsk == "石头" and cmputer == "剪刀") or (blsk == "剪刀" and cmputer == "布"):
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