Commit 11b2d705 by BellCodeEditor

save project

parent 7f001875
Showing with 13 additions and 10 deletions
......@@ -6,13 +6,16 @@ while True:
lis=['石头','剪刀','布']
com=random.choice(lis)
print("电脑出拳:"+com)
if com==player:
print('平局')
elif com=='石头' and player=='布':
print('win')
elif com=='布' and player=='剪刀':
print('win')
elif com=='剪刀' and player=='石头':
print('win')
if player in lis:
if com==player:
print('平局')
elif com=='石头' and player=='布':
print('win')
elif com=='布' and player=='剪刀':
print('win')
elif com=='剪刀' and player=='石头':
print('win')
else:
print('lose')
else:
print('lose')
\ No newline at end of file
print('mistake')
\ 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