from turtle import *
from random import *
painter = Turtle()
painter.penup()
painter.goto(-100,100)
painter.pendown()
painter.speed(70)
for i in range(0,15):
painter.write(i)
painter.right(90)
painter.forward(200)
painter.left(180)
painter.forward(200)
painter.right(90)
painter.forward(20)
first=Turtle()
first.shape("turtle")
first.color("red")
first.penup()
first.goto(-120,70)
first.pendown()
second=Turtle()
second.shape("turtle")
second.color("blue")
second.penup()
second.goto(-120,40)
second.pendown()
first=0
second=0
while ((first<305) and (second<305)):
first_step = random.randint(1,5)
first += first_step
first.forward(first_step)
second_step = random.randint(1,5)
second += second_step
second.forward(second_step)
Исход: AttributeError: 'function' object has no attribute 'randint' on line 40
Прошу помочь...