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

I’m having trouble finding figurative language for sonnet 112
Please help with SPANISH!! I will greatly appreciate your help!. "Your friend wants to know how to download a software program so you give him instructions on h
Given f(x) = 17-X^2, what is the average rate of change in f(x) over the interval [1, 5]?
PLEASE HELPPPPPP 100 points
6–23 an automobile engine consumes fuel at a rate of 22 l/h and delivers 55 kw of power to the wheels. if the fuel has a heating value of 44,000 kj/kg and a den
If f(x) = x + 8 and g(x) = -4x - 3, find (f+ g)(x).​
How can you understand what your boss is asking for in a email?
The person that named Nigeria? The famous author from Nigeria that worked in a university in Massachusetts? The year Nigeria got her independence? The European
describe an aqueous solution​
what is the quotient when root 1500 is divided by 2 root 15