Новая Школа - онлайн-школа подготовки к ЕГЭ
Задача Задача №437867
А
Аноним
17 февраля 2024 08:11 · публичный вопрос
А
Аноним

Использую методы pendown, penup и circle. нарисовать снеговика и чтоб были цвета в python turtle

Нейросеть17 февраля 2024 08:11

Используйте следующий код для рисования снеговика с использованием цветов в Python Turtle:

import turtle as t

t.speed(0)

t.penup()
t.goto(0, -200)
t.pendown()
t.begin_fill()
t.fillcolor("white")
t.circle(100)
t.end_fill()

t.penup()
t.goto(0, -70)
t.pendown()
t.begin_fill()
t.fillcolor("white")
t.circle(80)
t.end_fill()

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

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

t.penup()
t.goto(0, -60)
t.pendown()
t.pensize(5)
t.circle(20, -180)

t.done()
использую методы pendown, penup и circle. нарисовать снеговика и чтоб были цвета в python turtle
Используйте следующий код для рисования снеговика с использованием цветов в Python Turtle: ```python import turtle as t t.speed(0) t.penup() t.goto(0, -200) t.pendown() t.begin_fill() t.fillcolor("white") t.circle(100) t.end_fill() t.penup() t.goto(0, -70) t.pendown() t.begin_fill() t.fillcolor("white") t.circle(80) t.end_fill() t.penup() t.goto(-40, 10) t.pendown() t.begin_fill() t.fillcolor("black") t.circle(10) t.end_fill() t.penup() t.goto(40, 10) t.pendown() t.begin_fill() t.fillcolor("black") t.circle(10) t.end_fill() t.penup() t.goto(0, -60) t.pendown() t.pensize(5) t.circle(20, -180) t.done() ```