Commit 2d935255 by BellCodeEditor

save project

parent a13f5bbc
Showing with 31 additions and 27 deletions
import turtle
pen = turtle.Pen()
pen.write("锄禾日当午,\n汗滴禾下土。",font=("Times",30,"normal"))
pen.hideturtle()
turtle.done
\ No newline at end of file
# pen = turtle.Pen()
# pen.write("锄禾日当午,\n汗滴禾下土。",font=("Times",30,"normal"))
# pen.hideturtle()
# turtle.done()
pen=turtle.Pen()
pen.shape("turtle")
pen.left(45)
forward(100)
pen.extent(50,180)
pen.right(90)
pen.extent(50,180)
forward(100)
turtle.done()
\ No newline at end of file
#
while True:
player = input("请出拳(石头/剪刀/布):")
print("玩家出拳:"+player)
import random
list = ["石头","剪刀","布"]
computer=random.choice(list)
print("电脑出拳:"+computer)
if player in list:
if player == computer:
input("平局")
elif (player=="石头") and (computer == "剪刀"):
input("赢了")
elif (player=="布") and (computer=="石头"):
input("赢了")
elif (player=="剪刀") and (computer=="布"):
input("赢了")
else:
print("输了")
else:
print("输入错误")
\ No newline at end of file
import turtle
# pen = turtle.Pen()
# pen.write("锄禾日当午,\n汗滴禾下土。",font=("Times",30,"normal"))
# pen.hideturtle()
# turtle.done()
pen1=turtle.Pen()
pen1.shape("turtle")
pen1.color("green")
pen1.pensize(5)
pen1.left(45)
pen1.forward(100)
pen1.circle(50,180)
pen1.right(90)
pen1.circle(50,180)
pen1.forward(100)
pen1.turtle.hide
turtle.done()
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