Commit da4bc2aa by BellCodeEditor

save project

parent 6291caf8
Showing with 25 additions and 3 deletions
import turtle
pen1=turtle.Pen()
pen1.pencolor("red")
pen1.pensize(6)
pen1.left(45)
pen1.forward(100)
pen1.circle(50,180)
pen1.right(90)
pen1.circle(50,180)
pen1.forward(100)
turtle.done()
import random
player = input("布、石头、剪刀:") player = input("布、石头、剪刀:")
list = ["布","石头","剪刀"]
computer = random.choice(list)
print("玩家出拳:"+player) print("玩家出拳:"+player)
import random
lsit = ["布","石头","剪刀:"]
computer = random choice(list)
print("机器人出拳:"+computer) print("机器人出拳:"+computer)
if player in list:
if player ==computer:
print("平局")
elif (player== "石头"and computer=="布") or (player== "布"and computer=="剪刀") or (player== "剪刀"and computer=="石头"):
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