Question: app.stepsPerSecond = 5 app.reds = [ 2 5 5 , 2 2 0 , 2 0 0 , 1 5 0 , 1 2 5
app.stepsPerSecond
app.reds
app.y
Rect
def drawRowOfRectangles:
x
# Draws a rectangle for each red value.
for red in app.reds:
Rectx app.y fillrgbred
x
def onMousePressmouseX mouseY:
drawRowOfRectangles
# Remove the last value from the app.reds list and store it in newVal.
### Fix Your Code Here ###
newVal
# Creates a new list with the last value.
newList newVal
# Add all of the other red values to the newList.
### HINT: Loop over app.reds and add each element to newList.
### Place Your Code Here ###
# Sets app.reds equal to the new list.
app.reds newList
# Shifts where the next rectangle will be drawn.
app.y
##### Place your code above this line, code below is for testing purposes #####
# test case:
onMousePress
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
