Commit f39bd946 by BellCodeEditor

save project

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