OojohnnyoO3632 OojohnnyoO3632
  • 01-04-2020
  • Computers and Technology
contestada

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

Respuesta :

abidhussain7972
abidhussain7972 abidhussain7972
  • 02-04-2020

Answer:

H=(A*D)-(B*(D-1))

H = A*D- B*D+B

H-B = (A-B)*D

D= (H-B)/(A-B)

Python 3 code

import math

H=int(input('Enter Height: '))

up=int(input('Enter Number of Feet Up: '))

down=int(input('Enter Number of Feet Down: '))

D=(H-down)/(up-down)

print(math.ceil(D),' Days'

Explanation:

The output of the Program is given in the attached file.

Ver imagen abidhussain7972
Answer Link

Otras preguntas

Brainliest answer to whoever helps me! ______ are stocks and bonds representing secured or asset-based claims by investors against issuers. A. Commodities B. Se
HELP ME PLZZ, I AINT GOT A BRAINIf possible, write each comparison of concentrate to water as a ratio. If not possible, explain why. A)The mix is 60% concentr
What is the relationship between the size and weight of an object and the amount of friction that is present?
The difference of two numbers is 8. the sum of the two numbers is 14. what are the two numbers?
.................................
What would be an example of capitalism?
Why might the existence of the 2 alliances have actually helpt to encourage a massive war?
Do you agree or disagree with Abraham Lincoln 's sentence? "Be sure you put your feet in the right place, then stand firm." Explain why
Help plz really plzz
Who followed the teachings of Karl Marx, led the Bolsheviks, and became the first leader of the USSR? Question 12 options: A. Vladimir Lenin B. Leon Trots