TypeError: the argument of type object after * must be iterative, not int in Python
Dung Do Tien Sep 23 2021 416
I am creating a animal program that will draw a Christmas tree and some knickknacks. I want the baubles to have random colors and go to random points on the Christmas tree. This is my code:
However, when I run the program, this error appears:
TypeError: the argument of type object after * must be iterative, not int
How do I fix this? I'm using Python 3.8.2.
Thanks for any suggestions.
Have 2 answer(s) found.
Simeon Ezechinyere Sep 23 2021
I don't know about animal, but my best guess is that there is a problem with your brace:
Change it to:
I hope it works for you.
Manish Kumar Sep 23 2021
You can declare two variable and pass them into
goto(x, y)method as below:
x = random.randint(1,16) y = random.randint(1,16)
And call them:
Hope it helpful for you.
* Type maximum 2000 characters.
* All comments have to wait approved before display.
* Please polite comment and respect questions and answers of others.