jeudi 28 janvier 2021

Python random square movement not working

I am trying to make a square that repeatedly moves forward a random amount of pixels, but here's what happens:

gui.move(ai, random.randint(10, 100, 10), 0) # gui is the tkinter canvas

then I get:

TypeError: randint() takes 3 positional arguments but 4 were given

How can I have 3 parameters but keep it the same?




Aucun commentaire:

Enregistrer un commentaire