import turtle import pygame def draw_cake(): screen = turtle.Screen() screen.bgcolor("white") cake_turtle = turtle.Turtle() cake_turtle.shape("circle") cake_turtle.color("brown") cake_turtle.penup() cake_turtle.goto(0, -100) cake_turtle.pendown() cake_turtle.begin_fill() cake_turtle.circle(100) cake_turtle.end_fill() # Пишем "С днем рождения!" def write_birthday_message(): birthday_turtle = turtle.Turtle() birthday_turtle.penup() birthday_turtle.goto(-50, 0) birthday_turtle.color("black") birthday_turtle.write("С днем рождения!", font=("Arial", 16, "bold")) def song(): pygame.mixer.init() sound = pygame.mixer.Sound("sound.wav") sound.play() pygame.time.wait(int(sound.get_length() * 1000)) print("hi")
draw_cake()write_birthday_message()song()