Question: Intro to Programming: Exercise 2: RiderHeight.py 1) Write an if-elif-else chain that determines the amount of rides a person can ride based on their height.

Intro to Programming:

Exercise 2: RiderHeight.py

1) Write an if-elif-else chain that determines the amount of rides a person can ride based on their height.

2) If the person is less than 40 tall, print a message that there are 20 rides that they can ride.

3) If the person is greater than 40 tall but less or equal to 42 tall than, print a message that there are 28 rides that they can ride.

4) If the person is greater than 42 tall but less or equal to 48 tall than, print a message that there are 35 rides that they can ride.

5) If the person is greater than 48 tall but less or equal to 53 tall than, print a message that there are 36 rides that they can ride.

6) If the person is equal to or greater than 54 than, print a message that they can ride all of the rides.

7) Choose an arbitrary starting value for the variable height (this should be in inches).

8) Change the height variable value to the following numbers and run the program after each change

a) 35

b) 41

c) 45

d) 50

e) 55

9) What happens if you use the following numbers?

a) 40

b) 54

c) Fix the chain to accommodate these numbers and rerun the program to retest both.

d) Include the output of both tests after you fixed the chain.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!