From 3d3201c6a84feaa804be63d5a3c549fa6e17e95f Mon Sep 17 00:00:00 2001 From: 24_ZhurovichAM <24_ZhurovichAM@iux.local> Date: Wed, 18 Mar 2026 13:01:00 +0300 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20=C2=AB?= =?UTF-8?q?/=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task1new.py | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 task1new.py diff --git a/task1new.py b/task1new.py new file mode 100644 index 0000000..8058101 --- /dev/null +++ b/task1new.py @@ -0,0 +1,90 @@ +import pygame +from pygame.draw import ellipse, circle + +pygame.init() +FPS = 30 +screen = pygame.display.set_mode((800, 600)) + + +def draw_ear(surface, x, y, width, height, color): + + + ellipse(surface, color, (x, y, width, height)) + + +def draw_head(surface, x, y, radius, color): + + + + circle(surface, color, (x, y), radius) + + +def draw_eye(surface, x, y, radius, color): + + circle(surface, color, (x, y), radius) + + +def draw_nose(surface, x, y, radius, color): + + + + + circle(surface, color, (x, y), radius) + + +def draw_body(surface, x, y, width, height, color): + + + + ellipse(surface, color, (x, y, width, height)) + + +def draw_leg(surface, x, y, width, height, color): + + + ellipse(surface, color, (x, y, width, height)) + + +def draw_hare(surface, x, y, color): + + + draw_ear(surface, x + 350, y + 130, 30, 100, color) + + draw_ear(surface, x + 420, y + 130, 30, 100, color) + + + draw_head(surface, x + 400, y + 250, 40, color) + + + draw_eye(surface, x + 385, y + 240, 5, (0, 0, 0)) + draw_eye(surface, x + 415, y + 240, 5, (0, 0, 0)) + + + draw_nose(surface, x + 400, y + 260, 5, (255, 0, 0)) + + + draw_body(surface, x + 360, y + 280, 80, 120, color) + + + draw_body(surface, x + 355, y + 290, 25, 45, color) + draw_body(surface, x + 420, y + 290, 25, 45, color) + + + draw_leg(surface, x + 340, y + 360, 30, 50, color) + draw_leg(surface, x + 430, y + 360, 30, 50, color) + + + +draw_hare(screen, 0, 0, (150, 150, 150)) + +pygame.display.flip() + +clock = pygame.time.Clock() +finished = False +while not finished: + clock.tick(FPS) + for event in pygame.event.get(): + if event.type == pygame.QUIT: + finished = True + +pygame.quit() \ No newline at end of file -- 2.49.0