Commit f7417f09 by BellCodeEditor

save project

parent 25abb509
Showing with 18 additions and 3 deletions
player=input("请出拳:石头/剪刀/布")# 玩家出拳 import random
print("玩家出拳:"+player) list=['石头','剪刀','布']
\ No newline at end of file m=random.choice(list)
while True:
player=input("请出拳:石头/剪刀/布")# 玩家出拳
print("玩家出拳:"+player)
print('电脑出拳:'+ m)
if m==player:
print('平局')
elif m==list(1)and player==list(2):
print("电脑赢")
elif m==list(2) and player==list(0):
print('电脑赢')
elif m==list(0) and player==list(1):
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