Commit 420e519e by BellCodeEditor

save project

parent 220fe62b
Showing with 26 additions and 0 deletions
from random import choice
s = int(input("剪刀1/石头2/布3:"))
print("玩家出:",s)
t = choice([1,2,3])
if t==1:
tt = '剪刀'
if t==2:
tt = '石头'
if t==3:
tt = '布'
print("电脑出",tt)
if s == t:
print('平局')
elif abs(s-t)==1:
if s>t:
print('玩家赢')
else:
print('电脑赢')
else:
if s>t:
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