Commit fc9b6bf9 by BellCodeEditor

auto save

parent 7aba3e56
Showing with 4 additions and 2 deletions
import random import random
#玩家出拳
player=input("请输入:") player=input("请输入:")
print("玩家请出拳:"+player) print("玩家请出拳:"+player)
#创建列表
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
#计算机出拳
computer=random.choice(list) computer=random.choice(list)
print("计算机出拳:"+computer) print("计算机出拳:"+computer)
#判断玩家出拳是否符合规定并判断游戏结果
if player in list: if player in list:
if player==computer: if player==computer:
print("平局") 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