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

A hiker walks at a speed of 3 2 5 kilometers per hour. How many kilometers will the hiker walk in 5 hours
all their efforts were well.....after they finished their work on the project lasting 2 months without any rest
Which figure below shows the correct vector relationship between voltage and current in a parallel LC circuit?
how to calculate the mean rate of respiration of maggots in mm per min
This equation shows a way to find a fraction equivalent to 1618. Enter numbers below to correctly complete the equation. 16 16 16 ÷ 8 = ÷ 1 = = 18 18 18 ÷
Here is another algebra math problem that I need help with, sorry I've been struggling in math. The math problem is in the picture below:
Construire (f2) l'image de (f) par la translation de vecteur
what is the end behavior of: 1. [tex]\sqrt[3]{6x}[/tex] 2. [tex]\sqrt[3]{x-5}-6[/tex] 3. [tex]-3\sqrt[3]{x+3}+7[/tex]
Resuelve el sistema de ecuaciones por eliminación: - x - 6 años =3 8y -2x_+ 2 años = - 8.
what is the angle with tangent 1.125​