Question: 1 . Write a program to provide information on the height of a ball thrown straight up into the air. The program should request as
Write a program to provide information on the height of a ball
thrown straight up into the air. The program should request as input the initial height,
h feet, and the initial velocity, v feet per second. The height of the ball after t seconds
is h vt t feet. The program should perform the following two calculations
a Determine the maximum height of the ball. Note: The ball will reach its maximum
height after v seconds.
b Determine the height of the ball at seconds.
A function named getInput should be used to obtain the values of h and v and that
function should call a function named calculateheight to calculate the height of the ball.
Example
Enter the initial velocity of the ball:
The maximum height of the ball is feet.
The height of the ball at seconds is : feet
Future Value of a Bank Deposit The following program uses the function futureValue. The function computes the balance in a savings account given the amount deposited p the annual rate of interest r the number of times interest is compounded per year n and the number of years that interest accrues t
def futureValuep r n t Have a main function that will get P r n and t Then pass the values to futureValuep r n t Print out Afinal deposit
final amount
initial principal balance
interest rate
number times interest applied per time period
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
