Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

app.background = gradient ( rgb ( 2 5 , 2 5 , 1 8 0 ) , rgb ( 2 5 , 2 5 ,

app.background = gradient(rgb(25,25,180), rgb(25,25,80), start='right-top')
Star(350,50,53,500, fill='maroon')
Star(350,50,28,500, roundness=90)
Rect(0,365,400,135, fill='seaGreen')
pyramid = Group()
def drawPyramid(blockHeight):
# Draw the layers leading up to the top of the pyramid.
### (HINT: Using an align of 'bottom' will make it easier!)
### Place your code here ###
# This variable defines the top of where the stairs should end.
stairsTop = pyramid.top +2* blockHeight
# Polygon for the staircase
Polygon(85,380,160, stairsTop, 240, stairsTop, 315,380,
fill=gradient('sienna', 'goldenrod', start='top'), border='black')
# Chamber at the top of the pyramid
Rect(200, stairsTop, 40,15, align='bottom')
Rect(200, pyramid.top + blockHeight, 180,5, fill='darkGoldenrod',
border='black', align='bottom')
Rect(200, pyramid.top + blockHeight, 180,5, fill='darkGoldenrod',
border='black', align='top')
# mist
mist = Group(
Star(150,345,50,600, opacity=40, fill='white'),
Star(175,351,48,600, opacity=30, fill='white'),
Star(200,350,52,600, opacity=30, fill='white'),
Star(225,347,47,600, opacity=30, fill='white'),
Star(250,353,51,600, opacity=40, fill='white')
)
mist.width =600
##### Place your code above this line, code below is for testing purposes #####
# test case:
drawPyramid(30)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

3rd Edition

978-1119907466

More Books

Students also viewed these Databases questions