Commit f39bd946 by BellCodeEditor

save project

parent c6213be7
Showing with 14 additions and 9 deletions
......@@ -5,14 +5,18 @@ while True:
xsb=['石头','剪刀','布']
dsb=random.choice(xsb)
print('机器人出了'+dsb)
if sb==dsb:
print('平局')
elif sb=='石头'and dsb=="剪刀":
print('恭喜你,你赢了')
elif sb=='剪刀' and dsb=='布':
print('恭喜你,你赢了')
elif sb=='布' and dsb=='石头':
print('恭喜你,你赢了')
if sb in xsb:
if sb==dsb:
print('平局')
elif sb=='石头'and dsb=="剪刀":
print('恭喜你,你赢了')
elif sb=='剪刀' and dsb=='布':
print('恭喜你,你赢了')
elif sb=='布' and dsb=='石头':
print('恭喜你,你赢了')
else:
print('很遗憾,你输了')
else:
print('很遗憾,你输了')
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