Commit e35c6e4e by BellCodeEditor

save project

parent 4f07e0d8
Showing with 9 additions and 9 deletions
# 玩家出拳
import random
t=input("chuquan(s/j/b)")
print("player use:"+t)
m=input("chuquan(s/j/b)")
print("player use:"+m)
list=["s","j","b"]
m=random.choice(list)
print("computer use:"+m)
if (m==t):
c=random.choice(list)
print("computer use:"+c)
if (c==m):
print("ping ju")
elif (m=="s" and t=="j") or (m=="j" or t=="b") or (m=="b" or t=="s"):
print("piayer win")
elif (c=="s" and m=="j") or (c=="j" and m=="b") or (c=="b" and m=="s"):
print("computer win")
else:
print("computer win")
\ No newline at end of file
print("piayer win")
\ 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