A standard science experiment is to drop a ball d 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 10 feet bounces 6 feet high, the index is 0.6, and the total distance travelled by the ball is 16 feet after one bounce. If the ball were to continue bouncing, the distance after two bounces would be 10 ft + 6 ft +6 ft +3.6 ft 25.6 ft. Note that the distance travelled for each successive bounce is the distance to the floor plus 0.6 of that distance as the ball comes back up. Write a program that lets the user enters the: initial height from which the ball is dropped the bounciness index the number of times the ball is allowed to continue bouncing Output should be the total distance travelled by the ball. Below is an example of the program input and output: Enter the height from which the ball is dropped: 25 Enter the height from which the ball is dropped: 25 Enter the bounciness index of the ball: .5 Enter the bounciness index of the ball: .5 Enter the number of times the ball is allowed to continue bouncing: 3 Enter the number of times the ball is allowed to continue bouncing: 3 Total distance traveled is: 65.625 units. Total distance travelled is: 65.625 units.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Write a python program from the question that lets the user enters the:
• initial height from which the ball is dropped
• the bounciness index
• the number of times the ball is allowed to continue bouncing
• Output should be the total distance travelled by the ball.

 

The program should work and display correct outputs. Example is included below the question

A standard science experiment is to drop a ball d 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 10 feet bounces 6 feet high, the index is 0.6, and the total distance travelled by the ball is 16
feet after one bounce. If the ball were to continue bouncing, the distance after two bounces would be 10 ft + 6 ft +6 ft +3.6 ft = 25.6 ft.
Note that the distance travelled for each successive bounce is the distance to the floor plus 0.6 of that distance as the ball comes back up.
Write a program that lets the user enters the:
initial height from which the ball is dropped
the bounciness index
the number of times the ball is allowed to continue bouncing
Output should be the total distance travelled by the ball.
Below is an example of the program input and output:
Enter the height from which the ball is dropped: 25
Enter the height from which the ball is dropped: 25
Enter the bounciness index of the ball: .5
Enter the number of times the ball is allowed to continue bouncing: 3
Enter the bounciness index of the ball: .5
Enter the number of times the ball is allowed to continue bouncing: 3
Total distance traveled is: 65.625 units.
Total distance travelled is: 65.625 units.
Transcribed Image Text:A standard science experiment is to drop a ball d 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 10 feet bounces 6 feet high, the index is 0.6, and the total distance travelled by the ball is 16 feet after one bounce. If the ball were to continue bouncing, the distance after two bounces would be 10 ft + 6 ft +6 ft +3.6 ft = 25.6 ft. Note that the distance travelled for each successive bounce is the distance to the floor plus 0.6 of that distance as the ball comes back up. Write a program that lets the user enters the: initial height from which the ball is dropped the bounciness index the number of times the ball is allowed to continue bouncing Output should be the total distance travelled by the ball. Below is an example of the program input and output: Enter the height from which the ball is dropped: 25 Enter the height from which the ball is dropped: 25 Enter the bounciness index of the ball: .5 Enter the number of times the ball is allowed to continue bouncing: 3 Enter the bounciness index of the ball: .5 Enter the number of times the ball is allowed to continue bouncing: 3 Total distance traveled is: 65.625 units. Total distance travelled is: 65.625 units.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education