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

In 1774, the First Continental Congress suggested that colonists boycott British goods to protest
PLEASE HELP SKDKD KD
Choose the correct word. _____ indica que no puedes rebasar. La entrada El rótulo
PLS HELP ME ASAP!!!!! I WILL GIVE BRAINLIEST!!!!!!!! 1. What is happening (literally) in this cartoon? 2. Who does the family represent, and who does the man in
An electron is approximately 0.05% of the mass of a proton. Protons and neutrons each have a mass of 1 amu. Which of the following best describes the relationsh
What does this mean in spanish? -El paso número 3 después de lavarme la boca es ir a desayunar.
"What European country attempted to colonize the Roanoke area in 1587"
this is true or false? and why.​
Please help me solve this question. It's about the application of sequence and series in the real wold. ​
how to say you're welcome in french