I'm trying to make a program that draws five balls on my screen using the turtle module in python. I'm trying to use as little lines of code as possible but now i have this attribute error which I don't understand.
import turtle
import random
class turtles:
def __init__(self):
self.turtle.Pen()
self.color(random.randint(0.0, 1.0),random.randint(0.0, 1.0) ,random.randint(0.0, 1.0))
self.begin_fill()
self.circle(50)
self.end_fill()
t1= turtles()
def t1_circle():
t1.left(90)
t1.forward(250)
mycircle(random.randint(0.0, 1.0),random.randint(0.0, 1.0) ,random.randint(0.0, 1.0))
t1_circle()
I expected a ball to be drawn on the screen displaying random colors.