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

Although reconstruction led to some positive changes what major goal did it fall to achieve?
2 ( k - 5 ) + 3k = k 6
Name the Quadrilateral x = 36 3x+11 3x+11 2x+47 X+83
What are five real life examples of Volume expansion ​
Last week, a dairy farm produced m kg of cheese. The dairy farm also produced 28 kg more yogurt than cheese and 3 times as much ice cream as cheese. The dairy f
how many 1 cm cubes are there in 100 cm cubes volume?​
Which change in Great Britain influenced the style and content of seventeenth- and eighteenth-century literature? A. the rise of lower classes B. Increased lite
WILL GIVE BRAINLIEST IF ANSWERED FAST!!!
In a vegetarian diet, 46 individuals include fruits in their meals and 22 individuals eat without including any fruits. Express the following in ratios: Fruit c
Although reconstruction led to some positive changes what major goal did it fall to achieve?