Question: Python quedtion Instructions A snail goes up A feet during the day and falls B feet at night. How long does it take him to

Python quedtion
Python quedtion Instructions A snail goes up A feet during the day
and falls B feet at night. How long does it take him

Instructions A snail goes up A feet during the day and falls B feet at night. How long does it take him to go up H feet? Given three integer numbers H, A and B (A>B), the program should output a number of days. Hint: Let D = the number of days it takes the snail to climb out of the well. This is the variable you will solve for: H= the depth of the well A = the distance the snail climbs during one day B = the distance the snail falls in one night. The amount the snail climbs on a given day Dis: A xD Because the snail won't slide back on the day he escapes from the well, the amount the snail slips from the previous day (D-1 is the previous day) is BX (D - 1) We have to subtract the distance the snail slips from the distance it advamces. So we have the equation: H - (A x D) - (B x Privacy Terms We have to subtract the distance the snail slips from the distance it advamces. So we have the equation: H = (A x D) - (B X (D - 1)) Use your high school algebra to solve for D. Example Input Enter Height: 10 Enter Number of Feet Up: 3 Enter Number of Feet Down : 2 Example Output I 8 Days Example Input Enter Height: 20 Enter Number of Feet Up: 7 Enter Number of Feet Down: 3 Example Output 5 Days Pay-Terma

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!