Commit 7674d4eb by BellCodeEditor

auto save

parent 7cd3392e
Showing with 43 additions and 12 deletions
import turtle
pen=turtle.Pen()
pen.pensize(5)
pen.pencolor("blue")
pen.left(90)
pen.circle(50)
pen.pencolor("black")
pen.circle(-50)
pen.penup()
pen.right(90)
pen.forward(100)
pen.left(90)
pen.pendown()
pen.pencolor("red")
pen.circle(-50)
pen.right(180)
pen.penup()
pen.forward(50)
pen.right(90)
pen.forward(50)
pen.right(90)
pen.pendown()
pen.pencolor("green")
pen.circle(-50)
pen.pencolor("yellow")
pen.circle(50)
pen.hideturtle()
turtle.done()
import turtle
pen=turtle.Pen()
pen.pensize(5)
pen.pencolor("red")
pen.left(45)
pen.forward(100)
pen.circle(50,180)
pen.right(90)
pen.circle(50,180)
pen.forward(100)
pen.hideturtle()
turtle.done()
s=0
a=input("请输入一段带有一个或多个'python'的话")
for i in range(len(a)):
if a[i:i+6]=='python':
s+=1
print("python出现的次数为",s)
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