сделал первое задание

This commit is contained in:
Игорь
2026-03-04 13:29:08 +03:00
parent 236783b42d
commit 123ac29363
3 changed files with 40 additions and 1 deletions

41
1.py
View File

@@ -1 +1,40 @@
print("hello, World")
import pygame
import sys
pygame.init()
# Настройки экрана
screen = pygame.display.set_mode((600, 600))
pygame.display.set_caption("Злой смайлик")
YELLOW = (255, 255, 0)
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
RED = (255, 0, 0)
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
screen.fill(WHITE)
pygame.draw.circle(screen, YELLOW, (300, 300), 200)
pygame.draw.circle(screen, RED, (220, 220), 30)
pygame.draw.circle(screen, RED, (380, 220), 30)
pygame.draw.circle(screen, BLACK, (220, 220), 12)
pygame.draw.circle(screen, BLACK, (380, 220), 12)
pygame.draw.line(screen, BLACK, (150, 150), (230, 190), 20)
pygame.draw.line(screen, BLACK, (450, 150), (370, 190), 20)
pygame.draw.rect(screen, BLACK, (200, 370, 200, 30))
pygame.display.flip()
pygame.quit()
sys.exit()

0
2.py Normal file
View File

0
3.py Normal file
View File