Commit cdfdcdc4 by BellCodeEditor

auto save

parent aaba8472
Showing with 11 additions and 2 deletions
...@@ -3,4 +3,14 @@ print("请玩家出拳"+player) ...@@ -3,4 +3,14 @@ print("请玩家出拳"+player)
import random import random
ty =["石头","剪刀","布"] ty =["石头","剪刀","布"]
vip=random.choice(ty) vip=random.choice(ty)
print("电脑出拳"+vip) print("电脑出拳"+vip)
\ No newline at end of file if player == vip:
print("平局")
elif player == "布" and vip == "石头"
print("玩家赢")
elif player == "石头" and vip =="剪刀"
print("玩家赢")
elif player == "剪刀" and vip =="布"
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