Commit f5ad02ad by BellCodeEditor

save project

parent d622f6d5
Showing with 14 additions and 1 deletions
def pri():
print("你赢")
guanqiashu=input("数量:")
for i in range(0,int(guanqiashu),1):
passs=input("玩家请出拳(石头/剪刀/布):")
print("玩家出拳:",passs)
print("玩家出拳:\n ",passs)
#计算机出拳
import random
list=["剪刀","石头","布"]
hello=random.choice(list)
print("电脑出拳:\n",hello)
if passs==hello:
print("平局")
elif passs=="石头" and hello=="剪刀":
pri()
elif passs=="剪刀" and hello=="布":
pri()
elif passs=="布" and hello=="石头":
pri()
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