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

Deon throws a ball into the air. The height, h, of the ball, in meters, at the time t seconds is modeled by the function h(t) = -5t + t + 4. 1. When will the b
oranges cost $3.42 for 9 pounds at this rate how much would 12 pounds cost ?
For the data shown in the scatter plot, which is the best estimate of r?
2^n+1 = 1/8solve each equation by solving Nthe answer is -4 but I need to solve how to do it
Indicate whether each ecosystem is SALTWATER, FRESHWATER or BOTH.A. Coral reefsB. EstuariesC. Rivers and streamsD. Open oceansE. Lakes and pondsF. Wetlands
For the data shown in the scatter plot, which is the best estimate of r?
For the data shown in the scatter plot, which is the best estimate of r?
A rectangle has a length of 26 inches and a width of 14 inches. If 1 inch = 2.54 centimeters, find the area of the rectangle in centimeters. Round the answer to
Answer questions: 1.1 x-intercepts y-intercept and vertical asymptotes Then 1.2 the domain and range 1.3 other asymptote and the end behavior
Find the sum or difference 8+(-5)