Python wiatrak

Data utworzenia: 2025-04-23 11:19:39
import turtle import random z=turtle.Turtle() z.shape("turtle") z.pensize(4) turtle.tracer(False) for i in range(8): z.color(random.choice(["red","blue","magenta"])) z.circle(100,-90) z.circle(100,90) z.lt(45) z.pu() z.goto(-150,150) z.pd() for a in range(8): z.color(random.choice(["green","yellow","black"])) z.circle(50,90) z.circle(-50,90) z.circle(-50,-90) z.circle(50,-90) z.lt(60) z.pu() z.goto(-150,-150) z.pd() def kw1 (bok): for b in range(4): z.fd(bok) z.lt(90) def flaga1(bok): z.color(random.choice(["green","yellow","black"])) z.fillcolor(random.choice(["green","yellow","black"])) z.begin_fill() z.fd(100) kw1(bok) z.bk(100) z.end_fill() for c in range(8): flaga1(10*c) z.lt(45) z.pu() z.goto(150,150) z.pd() z.write("Teges Szmeges",font=("Arial",30,"bold","italic","underline")) turtle.update()
Powrót