About what I learn, what I did

today i did some code/ I work on project stum

this one also

and i also made flower in python turtle

import turtle


screen = turtle.Screen()
screen.bgcolor("lightblue")


pen = turtle.Turtle()
pen.speed(0) 
pen.hideturtle()

def draw_petal(color):
    pen.color(color)
    pen.begin_fill()
    pen.circle(50, 60) 
    pen.left(120)
    pen.circle(50, 60)
    pen.end_fill()


def draw_flower():
    
    petal_colors = ["red", "orange", "yellow", "pink", "purple", "magenta"]
    for i in range(6):
        draw_petal(petal_colors[i % len(petal_colors)])
        pen.left(60) 

    
    pen.penup()
    pen.goto(0, -20) 
    pen.pendown()
    pen.color("brown")
    pen.begin_fill()
    pen.circle(20)
    pen.end_fill()


draw_flower()


screen.exitonclick()

i made a clown

import turtle


screen = turtle.Screen()
t = turtle.Turtle()
t.speed(1) 
t.pensize(3)


t.fillcolor("blue")
t.begin_fill()
t.circle(100)
t.end_fill()


t.penup()
t.goto(-50, 120)
t.pendown()
t.fillcolor("white")
t.begin_fill()
t.circle(20)
t.end_fill()

t.penup()
t.goto(50, 120)
t.pendown()
t.fillcolor("white")
t.begin_fill()
t.circle(20)
t.end_fill()


t.penup()
t.goto(-50, 130)
t.pendown()
t.fillcolor("black")
t.begin_fill()
t.circle(10)
t.end_fill()

t.penup()
t.goto(50, 130)
t.pendown()
t.fillcolor("black")
t.begin_fill()
t.circle(10)
t.end_fill()


t.penup()
t.goto(-60, 50)
t.pendown()
t.fillcolor("red")
t.begin_fill()
t.goto(60, 50)
t.setheading(270)
t.circle(-60, 180)
t.goto(-60, 50)
t.end_fill()


t.penup()
t.goto(-30, 50)
t.pendown()
t.fillcolor("red")
t.begin_fill()
t.goto(30, 50)
t.setheading(270)
t.circle(-30, 180)
t.goto(-30, 50)
t.end_fill()

t.hideturtle()
screen.mainloop()

here is picture

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top