import turtle
# 1
def red_star():
turtle.fillcolor('red')
turtle.begin_fill()
for x in range(5):
turtle.forward(200)
turtle.left(144)
turtle.end_fill()
# 2
def eight_pointed_star():
for x in range(8):
turtle.forward(200)
turtle.left(135)
# 3
def olympic_circle():
turtle.color("blue")
turtle.penup()
turtle.goto(-110, -25)
turtle.pendown()
turtle.circle(45)
turtle.color("black")
turtle.penup()
turtle.goto(0, -25)
turtle.pendown()
turtle.circle(45)
turtle.color("red")
turtle.penup()
turtle.goto(110, -25)
turtle.pendown()
turtle.circle(45)
turtle.color("yellow")
turtle.penup()
turtle.goto(-55, -75)
turtle.pendown()
turtle.circle(45)
turtle.color("green")
turtle.penup()
turtle.goto(55, -75)
turtle.pendown()
turtle.circle(45)
turtle.color("black")
turtle.penup()
turtle.goto(0, 80)
turtle.pendown()
фрагмент используется для управления машинкой в игре.
чуть подправил код. примерно так он должен выглядеть
def moveRight (self, pixels):
self.rect.x + = pixels
def moveLeft (self, pixels):
self.rect.x - = pixels
while chek:
pygame.event.get():
if event.type pygame.QUIT:
check = False
elif event.key==pygame.KEYDOWN:
if event.key==pygame.K_x:
check = False
keys = pygame.key.get_pressed()
if keys [pygame.K_LEFT] :
playerCar.moveLeft(10)
if keys[pygame.K_RIGHT]:
playerCar.moveRight(10)
Если 000 - это явно "т". Значит в конце остаётся 1110 - в которое никак не вставишь заданные буквы. Проверьте правильность данного задания