Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN PYTHON Create a new program that prompts the user for the length in feet and thickness in inches of a cable. Validate the user

IN PYTHON

Create a new program that prompts the user for the length in feet and thickness in inches of a cable. Validate the user input (positive numbers only and cable thickness must 2.0 inches or less). If the user input is invalid, explain the specific error and prompt again. Simulate stretching the cable by applying tension in 1 pound increments (in a loop), and display the length of the cable as it stretches and the tension applied until it breaksthen announce that is has broken. The cable will stretch (thickness * 0.3 feet) for each additional pound applied, up to its breaking point. The cable will break when its length is 116% of the original length. The output will display the pounds applied, and the current length of the cable each time an additional pound of tension is applied, and when the cable has broken.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

b. Why were these values considered important?

Answered: 1 week ago