Odpowiedź:
import turtle
# Funkcja rysująca kwadrat
def draw_square():
for i in range(4):
turtle.forward(100)
turtle.right(90)
# Rysowanie domu
turtle.speed(0)
turtle.penup()
turtle.goto(-150, -150)
turtle.pendown()
turtle.color('black', 'grey')
turtle.begin_fill()
draw_square()
turtle.end_fill()
turtle.goto(-100, -150)
turtle.color('black', 'white')
turtle.goto(-80, -150)
turtle.goto(-150, -50)
turtle.color('black')
turtle.goto(-150, 50)
turtle.forward(300)
turtle.goto(-50, -150)
turtle.forward(50)
turtle.goto(50, 70)
turtle.color('yellow')
turtle.circle(30)
turtle.done()
DAJ NAJ I 5 GWIAZDEK
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
Odpowiedź:
import turtle
# Funkcja rysująca kwadrat
def draw_square():
for i in range(4):
turtle.forward(100)
turtle.right(90)
# Rysowanie domu
turtle.speed(0)
turtle.penup()
turtle.goto(-150, -150)
turtle.pendown()
turtle.color('black', 'grey')
turtle.begin_fill()
draw_square()
turtle.end_fill()
turtle.penup()
turtle.goto(-100, -150)
turtle.pendown()
turtle.color('black', 'white')
turtle.begin_fill()
draw_square()
turtle.end_fill()
turtle.penup()
turtle.goto(-80, -150)
turtle.pendown()
turtle.color('black', 'white')
turtle.begin_fill()
draw_square()
turtle.end_fill()
turtle.penup()
turtle.goto(-150, -50)
turtle.pendown()
turtle.color('black', 'white')
turtle.begin_fill()
draw_square()
turtle.end_fill()
turtle.penup()
turtle.goto(-150, -150)
turtle.pendown()
turtle.color('black')
draw_square()
turtle.penup()
turtle.goto(-150, 50)
turtle.pendown()
turtle.color('black')
turtle.forward(300)
turtle.penup()
turtle.goto(-50, -150)
turtle.pendown()
turtle.right(90)
turtle.color('black')
turtle.forward(100)
turtle.right(90)
turtle.forward(50)
turtle.right(90)
turtle.forward(100)
turtle.right(90)
turtle.forward(50)
turtle.right(90)
turtle.penup()
turtle.goto(50, 70)
turtle.pendown()
turtle.color('yellow')
turtle.begin_fill()
turtle.circle(30)
turtle.end_fill()
turtle.done()
DAJ NAJ I 5 GWIAZDEK