Question: Problem # 3 : Spinning Up the Robot Suppose you are programming a robot that needs to spin its flywheel to a specific speed before
Problem #: Spinning Up the Robot
Suppose you are programming a robot that needs to spin its flywheel to a specific speed before it can shoot a ball. The wheel spins around and around for many rotations whileloop iterations until it reaches the minimum required speed and then shoots the ball. Complete the function whenshoot, which returns the iteration during which the ball could be shot because the flywheel has reached the required minimum speed. The first iteration is iteration # The function takes three parameters:
ramprate: the number of rotations per minute rpm the flywheel increases per iteration
setspeed: the minimum rpm needed before the robot can shoot
hits: a list of iteration #s in which the robot gets hit by another robot. If the robot gets hit during an iteration, its speed decreases by rpm instead of increasing by ramprate.
Function Call
Expected Return Value integer
whenshoot
whenshoot
whenshoot
whenshoot
whenshoot
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
