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

3+3 what is it i need help please
HELP ME PLSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
Pythagorean Theorem:[tex]a^{2}[/tex] +[tex]b^{2}[/tex] =[tex]c^{2}[/tex] Question 8 options: [tex]\sqrt{26} \\\\\sqrt{89}[/tex] 8 5
Help please !!! Thanks guys
Are neibours necessary nowadays
I need help please?!!!!! Please help
On the Political Spectrum scale, Republicans are _______, while the Democrats are ____ a) Liberals; Conservatives b) Left wing; Right Wing c) Right wing; Left W
its the mickey mouse slaughterhouse u come inside ur bloods inside
HURRYYY!!!!!!!!! What resource from the Americas was introduced to Europe as part of trade during the 1500s? carrots lettuce onions tomatoes
The first cultures in New Mexico​