Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A standard science experiment is to drop a ball and see how high it bounces. Once the bounciness of the ball has been determined, the
A standard science experiment is to drop a ball and see how high it bounces. Once the bounciness of the ball has been determined, the ratio gives a bounciness index. For example, if a ball dropped from a height of feet bounces feet high, the index is and the total distance traveled by the ball is feet after one bounce. If the ball were to continue bouncing, the distance after two bounces would be ft ft ft ft ft Note that the distance traveled for each successive bounce is the distance to the floor plus of that distance as the ball comes back up Write a program that lets the user enter the initial height from which the ball is dropped and the number of times the ball is allowed to continue bouncing. Output should be the total distance traveled by the ball.
The program should include the following:
Docstring with name a program description
User inputs for initial height, bounces height and number of bounces
Implement the program using a FOR loop
Implement the program using a WHILE loop
Leave a comment above each loop
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started