Commit d80afc0f by BellCodeEditor

save project

parent 91bdf2d6
Showing with 12 additions and 2 deletions
......@@ -3,4 +3,14 @@ y = input('请输入(剪刀/石头/布)')
print('玩家出',y)
n = ['剪刀','石头','布']
s=random.choice(n)
print('机器人出',s)
\ No newline at end of file
print('机器人出',s)
if y == s:
print('平局')
elif y == '剪刀' and s == '布':
print('你赢了')
elif y == '布' and s == '石头':
print('你赢了')
elif y == '石头' and s == '剪刀':
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