'How can I find that dilemma of turtle module of int?
import turtle as turtle_module
import random
turtle_module.colormode(255)
tim = turtle_module.Turtle
color_list = [(253, 251, 242), (244, 254, 247), (253, 247, 253), (245, 248, 254),
(30, 8, 223), (57, 7, 56), (241, 137, 41), (249, 248, 41), (243, 126, 5),
(5, 247, 6), (30, 242, 33), (234, 7, 2), (191, 6, 96), (56, 13, 251), (226, 43, 69),
(111, 241, 112), (153, 61, 84), (109, 78, 219), (186, 146, 177), (237, 43, 35),
(215, 39, 22), (208, 7, 110), (251, 251, 0), (171, 165, 249), (224, 165, 208),
(145, 135, 228), (248, 162, 153), (253, 9, 5), (84, 57, 185), (2, 3, 118)]
tim.dot(20, random.choice(color_list))
screen = turtle_module.Screen()
screen.exitonclick()
tim.dot(20,) #it refuses the number of 20
Solution 1:[1]
You are not properly creating an instance of Turtle:
Change
tim = turtle_module.Turtle
to
tim = turtle_module.Turtle()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | re-za |
