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

Notice10 January 2018Gift A TreeThis is to inform students of Class XII to assemble in the ground on Saturday, 31 January2018 at 8:00 in the morning to particip
What is the best way to test a hypothesis? Group of answer choices design and perform an experiment create a large spreadsheet with all your data on it do lots
The table shows the times that street lights come on one night and go off the next morning.In Glasgow, the lights go off later than they do in Newcastle. How mu
Think of your own reading experience and write a paragraph of 150 – 200 words. Use the following questions to guide you. 1. What books or texts did you read whe
ways of improving sanitation in the school​
please help someone..
Please helpppp meee !!!!
Suppose every interior angle in a regular polygon is approximately 152.31∘. What kind of polygon is this?
If each side of a cube is doubled, its volume?​
Please help me out with this geometry