Commit 4ec28166 by BellCodeEditor

save project

parent 2ee7653e
Showing with 15 additions and 4 deletions
import random import random
player=input("要出啥,石,剪,布") player=input("要出啥石,剪,布")
print("玩家出"+player)# 玩家出拳 print("玩家出"+player)# 玩家出拳
computer=random.choice(["石""剪""布"]) computer=random.choice(["石","剪","布"])
print("电脑出"+computer) print("电脑出"+computer)
\ No newline at end of file if player==computer:
print("平局")
elif player=="剪"and computer=="布":
print("恭喜你发财")
elif player=="布"and computer=="石":
print("恭喜你发财")
elif player=="石"and computer=="剪":
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