easy_draw.load_canvas()
import
everything from a module at one fell swoop. This is called a wildcard import and it is done like this from module import *
. It makes it so you do not need to reference the module to use its commands. See below:easy_draw
each time. You do this by using the import module as nickname
structure.easy_draw
each time?" Rectangle(xy, width, height)
color
) are not positional arguments. These properties are keyword arguments and need to use the instance variable (property) name to set the value.Rectangle()
, Oval()
, Text()
, RegPolygon()
load_canvas()
, color
, .rotate()
, border_width
Rectangle
object is stored in a variable named square
. Because it stored in a variable, we can use the .rotate()
method on it.xy =(100, 200)
| Not this -- x = 100, y = 200
points_list
for Polygon
and Line
must be pairs of x and y (an even amount of numbers) but not in tuples, simply just listed: points_list = [50, 210, 180, 250, 300, 210]
points_list = [(50, 210), (180, 250), (300, 210)]