- From the starting code, polygon_art.py, you are to write an OO program that generates different pieces of art works
- Fork, then, clone this repo
- Read the instructions given in the course's Google Classroom and start coding
- Once you are done, push your final code to your Github repo and modify this README to report on the work you have done
-
Create Polygon Class and set function init(self) to contain the following variable *turtle speed = set speed *turtle bgcolor = set background color *turtle tracer = set tracer *turtle color mode = turtle color mode set to 255 *num sides = random side *size = random size *orientation = random orientation *location = random location *color = random color by calling polygon.get_new_color *border_size *Called Polygon.draw_polygon with contain all previous variables
-
Create get_new_color function and return 3 random color code each of them max 255
-
draw_polygon function used the variable from inti to draw a polygon at current position
-
reposition function we set the reduction_ratio at main and send the following variable to reposition function in polygon class to make it penup and move to random location and continue draw the polygon
-
about main I create a main that can select that you can choose to random or manual side I didnt do for loop because time is almost up but you can keep spam 1 for random image and get the if 4 in introduction by professor and choice 2 for manual you can get the same side with any amount by same type same side and repeat 2 and for choice 3 I used for exit program