Загрузить файлы в «/»

держи
This commit is contained in:
2026-03-18 11:25:26 +03:00
commit 07a7f185d5

36
task1.py Normal file
View File

@@ -0,0 +1,36 @@
import pygame
from pygame.draw import *
pygame.init()
screen = pygame.display.set_mode((800, 600))
# Какой-то запутанный код с зайцем
# (пример плохого кода, который нужно отрефакторить)
# Левое ухо
ellipse(screen, (150, 150, 150), (350, 130, 30, 100))
# Правое ухо
ellipse(screen, (150, 150, 150), (420, 130, 30, 100))
# Голова
circle(screen, (150, 150, 150), (400, 250), 40)
# Глаза
circle(screen, (0, 0, 0), (385, 240), 5)
circle(screen, (0, 0, 0), (415, 240), 5)
# Нос
circle(screen, (255, 0, 0), (400, 260), 5)
# Тело
ellipse(screen, (150, 150, 150), (360, 280, 80, 120))
ellipse(screen, (150, 150, 150), (355, 290, 25, 45))
ellipse(screen, (150, 150, 150), (420, 290, 25, 45))
# Лапы
ellipse(screen, (150, 150, 150), (340, 360, 30, 50))
ellipse(screen, (150, 150, 150), (430, 360, 30, 50))
pygame.display.flip()
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
exit()