Commit a03e7642 by BellCodeEditor

auto save

parent b5c6bbbe
Showing with 23 additions and 0 deletions
# 计算机
# 计算机
import random
list1=["石头","剪刀","布"]
computer=random.choice(list1)
# 用户
user=input("请输入石头/剪刀/布:")
if user in list1:
if computer==user:
print("平局")
elif (computer=="石头" and user=="布") or (computer=="布" and user=="剪刀") or (computer=="剪刀" and user=="石头"):
print("赢了")
else:
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