171k views
5 votes
Def drawSun(color):

# This draws space.
Rect(0, 0, 400, 400)

# Change the gradient to use the function parameter.
### Fix Your Code Here ###
Circle (200, 350, 500, fill-gradient('yellow', 'black', 'black'))
# Draw the sun. Use the function parameter!
### Place Your Code Here ###
Circle (200, 275, 40, fill='yellow')
# planet
Circle (200, 775, 500, fill='dodgerBlue')
Polygon (155, 280, 50, 305, 120, 330, 185, 300, 260, 300,
C Reset Code History
14
15
16
17
18
19
##### Place your code above this line, code below is for testing purposes #####
# test case:
20
21 drawSun('yellow')
22
Checklist
330, 325, 365, 310, 255, 280, fill= 'darkGreen')
Circle (200, 775, 500, fill-None, border='darkGreen', borderWidth=10)
Polygon (120, 390, 200, 330, 250, 340, 275, 350, 290, 385, 210, 380, fill= 'darkGreen')
Saved

Def drawSun(color): # This draws space. Rect(0, 0, 400, 400) # Change the gradient-example-1

1 Answer

7 votes

Answer:

def drawSun(color):

# This draws space.

Rect(0, 0, 400, 400)

# Draw the sun using the function parameter for the color.

Circle(200, 275, 40, fill=color)

# Draw the planet.

Circle(200, 775, 500, fill='dodgerBlue')

# Draw the mountains.

Polygon(155, 280, 50, 305, 120, 330, 185, 300, 260, 300, 330, 325, 365, 310, 255, 280, fill='darkGreen')

# Draw the planet's land.

Circle(200, 775, 500, fill=None, border='darkGreen', borderWidth=10)

Polygon(120, 390, 200, 330, 250, 340, 275, 350, 290, 385, 210, 380, fill='darkGreen')

# Test the function with a specific color.

drawSun('yellow')

Step-by-step explanation:

User Opensas
by
8.3k points