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

· The length of a room is 2 times it breadth and 5 times it height. Ifthe volume of the room is 800m3, find the cost of Parering itswalls at Rs. 6 Per m2?​
Find 25.1 ft in the radius circle
The labor relations system in the United States attempts to serve the goals of management, labor unions, and society at large. Management is interested in contr
Which of the following is the largest Customary Unit of time?
As you observe an unknown cell under a microscope, you make the following observations..
can somebody tell me the answer to this please​
Please help!!!! Which idea is central to the theme that Lincoln develops in the speech? A. The war has developed in ways neither side could have predicted. B. T
Solution is (-3,7), what are the linear equations
why do you think hinduism is called the eternal religion. in long. who who will answer I makes the brainliest.​
what are the experiences/lesson you've learned from the past year 2020​