From edcd5973a7656770dc209475680ddfad413fe7c3 Mon Sep 17 00:00:00 2001 From: 24_ChernovaSS <24_ChernovaSS@iux.local> Date: Wed, 4 Mar 2026 13:15:41 +0300 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8=D0=B5=201?= =?UTF-8?q?=20=D0=A1=D0=BC=D0=B0=D0=B9=D0=BB=D0=B8=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lab2/task1_smiley.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lab2/task1_smiley.py diff --git a/lab2/task1_smiley.py b/lab2/task1_smiley.py new file mode 100644 index 0000000..ae58984 --- /dev/null +++ b/lab2/task1_smiley.py @@ -0,0 +1,29 @@ +import pygame +from pygame.draw import * +pygame.init() +FPS = 30 +screen = pygame.display.set_mode((400, 400)) +# фон +rect(screen, (200, 200, 200), (0, 0, 400, 400)) +# лицо +circle(screen, (255, 255, 0), (200, 200), 120) +circle(screen, (0, 0, 0), (200, 200), 120, 3) +# глаза +circle(screen, (255, 0, 0), (160, 180), 25) +circle(screen, (0, 0, 0), (160, 180), 10) +circle(screen, (255, 0, 0), (240, 180), 20) +circle(screen, (0, 0, 0), (240, 180), 8) +# брови +polygon(screen, (0, 0, 0), [(110,130), (190,150), (180,160), (100,140)]) +polygon(screen, (0, 0, 0), [(290,130), (210,150), (220,160), (300,140)]) +# рот +rect(screen, (0, 0, 0), (150, 250, 100, 25)) +pygame.display.update() +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