Commit 47c9753c by BellCodeEditor

save project

parent a731b716
Showing with 9 additions and 3 deletions
import random
sb=input("出拳(石头/剪刀/布):")
print("我出:"+sb)
list = ['石头''剪刀''布']
list = ['石头','剪刀','布']
a=random.choice(list)
print('电脑出:'+a)
\ No newline at end of file
print('电脑出:'+a)
if sb==a:
print('平局')
elif (sb=="石头" and a=="剪刀") or (sb=="剪刀" and a=="布") or (sb=="布" and a=="石头"):
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