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

After you send in your FAFSA form, what will you receive back? A...Your Student Aid Report B...Your IRS Data Retrieval Form C.A copy of your family’s tax return
need 10 sentences in total with am not, is not, are not please
find the volume of a storage room that is 8 feet long, 6 feet wide, and 10 feet high. the room is in the shape of a rectangular solid.
Wats advantages and disadvantages about probation?
Clara has a package of six cookies she wants to share equally among her friends. If Clara makes sure that each piece of cookie will be 3/5 of a cookie, how man
what is the answer to 3,4
Find the object's speeds v1, v2, and v3 at times t1=2.0s, t2=4.0s, and t3=13s.
- 5/8c = 20 A. -34 B. -32 C. 32 D. 34
why critical thinking and skepticism are important to scientific inquiry
How are atoms and elements related?