Spring naar hoofdinhoud
Turtle-oefening

Vlag van Duitsland

Meld je aan om je oplossing in te dienen en feedback te krijgen.

import turtle as otto width = 165 height = 100 stripe_height = height / 3 def draw_centered_rectangle(x0, y0, width, height, pencolor, fillcolor): otto.penup() otto.goto(x0 - width / 2, y0 + height / 2) otto.pendown() otto.pencolor(pencolor) otto.fillcolor(fillcolor) otto.begin_fill() for side in range(2): otto.forward(width) otto.right(90) otto.forward(height) otto.right(90) otto.end_fill() # Draw the black, red, and yellow stripes.