Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Draw Something Picture 1: format of code example Picture 2: Requirements - You must use at least one line, at least one rectangle, and at
Draw Something Picture 1: format of code example Picture 2: Requirements - You must use at least one line, at least one rectangle, and at least one circle. - You must use shapes of at least two different colors. - You must use shapes of at least two different sizes. - You must have at least five shapes total. - You must leave a comment at the top of your program explaining what you are trying to do.
Status: Finalized Result World Quick Docs add(circ) : Show Exercise Circle #To make a circle circ = Circle(radius) circ.set_color(color) circ.set_position(x, y) # Example, blue circle with r Status: Not Submitted Result World ? Show Exercise 5.3.5 Graphics Stop Light main.py 1 # This program should draw a stop light 123 # Implement a function that draws a single circle 4 #with radius LIGHT_RADIUS. 5 6 7 8 9 10 11 12 13 14 rect= Rectangle(STOPLIGHT_WIDTH, STOPLIGHT_HEIGHT) 15 rect.set_position ((get_width()/2) - (STOPLIGHT WIDTH/2), (get_height()/2) - (STOPLIGHT_HEIGHT/2)) 16 rect.set_color(Color.gray) 17 add(rect) # The circle should be in the center of the screen horizontally. # Use the parameters for the y position and color # Add your code here LIGHT_RADIUS = 25 STOPLIGHT_WIDTH STOPLIGHT_HEIGHT BUFFER = 75 circ 18 19- def draw_circle(radius, x_pos, y_pos, color): 20 Circle (radius) 21 22 23 24 25 draw_circle(LIGHT_RADIUS, get_width()/2, get_height()/2, Color.yellow) 26 draw_circle(LIGHT_RADIUS, get_width()/2, (get_height()/2) - BUFFER, Color.red) 27 draw_circle(LIGHT_RADIUS, get_width()/2, (get_height()/2) + BUFFER, Color.green) = = 100 add(circ) = 250 circ.set_position(x_pos, y_pos) circ.set_color(color) Output Docs ? Assignment Overview Write a program to draw something fun or creative on the screen. Requirements: You must use at least one line, at least one rectangle, and at least one circle. You must use shapes of at least two different colors. You must use shapes of at least two different sizes. You must have at least five shapes total. You must leave a comment at the top of your program explaining what you are trying to do. Otherwise, there are no other requirements! Result Grade Submit + Continue More Save
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started