Commit c9fa4e79 by BellCodeEditor

save project

parent dc8bd118
Showing with 1 additions and 5 deletions
...@@ -7,11 +7,7 @@ computer=random.choice(c) ...@@ -7,11 +7,7 @@ computer=random.choice(c)
print('电脑出'+computer) print('电脑出'+computer)
if computer==player: if computer==player:
print('平局') print('平局')
elif computer=='布'and player=='剪刀': elif (computer=='石头'and player=='布')or(computer=='布'and player=='剪刀')or(computer=='石头'and player=='布'):
print('胜利')
elif computer=='剪刀'and player=='石头':
print('胜利')
elif computer=='石头'and player=='布':
print('胜利') print('胜利')
else: else:
print('失败') print('失败')
......
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