mercredi 9 juin 2021

How to Solve Turtle object of type 'function has no len() error?

I was writing a program where i want to create random colours nad use them to draw with turtle. At first it was giving

bad color sequence error

then i tried with screen.colormode(255)

now im getting this error '''' Traceback (most recent call last): File "F:\ai_ml\100_Days\day-18\random-movement.py", line 21, in tim.color(random_color()) # choosing random colours from colours list File "F:\root\lib\turtle.py", line 2217, in color pcolor = self._colorstr(pcolor) File "F:\root\lib\turtle.py", line 2697, in _colorstr return self.screen._colorstr(args) File "F:\root\lib\turtle.py", line 1153, in _colorstr if len(color) == 1: TypeError: object of type 'function' has no len() ''''

What to do?




Aucun commentaire:

Enregistrer un commentaire