Commit f8f58a91 by BellCodeEditor

auto save

parent 1fb1d2da
Showing with 19 additions and 0 deletions
import random
for i in range(4):
player = input("请输入你想出的拳:-----------")
list = ['石头','剪刀','步']
if player in list:
print("您出的拳是:-----------"+player)
computer = random.choice(list)
print("计算机出的拳是:------------"+computer)
if player == computer:
print("******你们两个平局了*******")
elif (player == "石头" and computer=="剪刀") or (player =="剪刀"
and computer=="布")or (player=="布" and computer=="石头"):
print("猜拳的结果是:-----------------*您赢了*")
else:
print("猜拳的结果是:------------------您输了-")
else:
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