Commit 48941165 by BellCodeEditor

save project

parent fb10bff7
Showing with 2 additions and 2 deletions
# 玩家出拳 # 玩家出拳
player_punch_out=input("punch out") player_punch_out=input("punch out")
print("玩家出钱"+player_punch_out) print("player punch out:"+player_punch_out)
import random import random
list1=['石头','剪刀','布'] list1=['石头','剪刀','布']
COM=random.choice(list1) COM=random.choice(list1)
print("计算机出:"+COM) print("计算机出:"+COM)
if player_punch_out==COM: if player_punch_out==COM:
print("平局") print("tie")
elif (player_punch_out=='剪刀'and COM=='布')or(player_punch_out=='石头'and COM=='剪刀')or(player_punch_out=='布'and COM=='石头'): elif (player_punch_out=='剪刀'and COM=='布')or(player_punch_out=='石头'and COM=='剪刀')or(player_punch_out=='布'and COM=='石头'):
print('you win') print('you win')
else : else :
......
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