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 line segment has an endpoint at(5,7). If the midpoint of the line segment is (3,3), what are the coordinates of the point at the other end of the line segment
How many men are killed each hour during World War I?
please please help me thank you
PLEASE HELP ME ! Convert the following description to a proper scale ratio: 8.4 cm represents an actual distance of 33.6 km.
I. Find the word which has different sound in the part underlined. 1. A. Wanted B. Washed C. Danced D. Played 2. A. Goes B. Watches C. Misses D. Brushes 3. A. C
What does narrative writing communicate? A. Reports B. Data O ООО C. Information D. A story
Determine the value of m in the equation m−2. 2=2. 5? A 0. 30 B 0. 50 C 3. 73 D 4. 7
BEST ANSWER GETS BRIANLIEST!!! GRAPH the line with the slope of 1 passing through the point (-1,5)
What was the main cause of the decrease in the size of the orange-bellied parrot population?
i need help fast guys​