Commit aaddf24b by BellCodeEditor

save project

parent 9956d3f7
Showing with 12 additions and 2 deletions
import random import random
sb=input("出拳吧!爸爸:") sb2=input("出拳吧!爸爸:")
list1=["剪刀","石头","布"] list1=["剪刀","石头","布"]
sb2=random.choice(list1) computer=random.choice(list1)
print(sb2) print(sb2)
if sb2 in list1:
if sb2 == computer:
print("平局")
elif(sb2=="石头" and computer=="剪刀")or(sb2=="剪刀" and computer=="布")or(sb2=="布" and computer=="石头"):
print("wc,爸爸赢啦")
else:
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