Commit 2673432a by BellCodeEditor

save project

parent 23dfff73
Showing with 17 additions and 0 deletions
import random
chuquan=input("玩家出拳:"+"(石头/剪刀/布)") # 玩家出拳
print("玩家出:"+chuquan)
list=["石头","剪刀","布"]
AI=random.choice(list)
print("AI出:"+AI)
if chuquan=="石头" and AI=="布":
print("AI胜利!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
elif chuquan=="剪刀" and AI=="石头":
print("AI胜利!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
elif chuquan=="布" and AI=="剪刀":
print("AI胜利!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
elif chuquan==AI:
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