Commit 79ee04da by BellCodeEditor

save project

parent f6458120
Showing with 21 additions and 22 deletions
import turtle
screen=turtle.Screen()
player=input("请出拳(石头/剪刀/布):") screen.bgcolor("light pink")
print("玩家出拳:"+player) pen=turtle.Pen()
import random pen.penup()
list=["石头","剪刀","布"] pen.goto(100,-100)
computer=random.choice(list) pen.write("傻逼\n黑胡椒",font=("Times",13,"normal"))
print("计算机出拳:"+computer) #pen.hideturtle()
if player in list: #turtle.done()
if player == computer: pen1=turtle.Pen()
print("平局") pen1.pensize(5)
elif player=="石头" and computer=="剪刀": pen1.pencolor("red")
print("恭喜,你赢了") pen1.left(45)
elif player=="剪刀" and computer=="布": pen1.forward(100)
print("恭喜,你赢了") pen1.circle(50,180)
elif player=="布" and computer=="石头": pen1.right(90)
print("恭喜,你赢了") pen1.circle(50,180)
else: pen1.forward(100)
print("只因你太美") pen1.hideturtle()
else: turtle.done()
print("输入错误") \ No newline at end of file
\ 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