Question

In: Computer Science

Write a PYTHON program that prompts the user to enter the account’s present value, yearly interest...

Write a PYTHON program that prompts the user to enter the account’s present value, yearly interest rate, and the number of years that the money will be left in the account. The program should pass these values to a function that returns the future value of the account, after the specified number of months. The program should display the accounts’ future value

Solutions

Expert Solution

Python code:

#defining function to print future value
def future_value(value,rate,years):
    #returning future value
    return value*(1+rate/100)**years
#accepting present value
value=int(input("Enter the present value: "))
#accepting intrest rate
rate=int(input("Enter the intrest rate: "))
#accepting number of years
years=int(input("Enter the number of years: "))
#calling future_value function and printing future value
print("Future value is {:.2f}".format(future_value(value,rate,years)))


Screenshot:


Input and Output:


Related Solutions

Write a program In python of Jupiter notebook (using loops) that prompts the user to enter...
Write a program In python of Jupiter notebook (using loops) that prompts the user to enter his/her favorite English saying, then counts the number of vowels in that (note that the user may type the saying using any combination of upper or lower case letters). Example: Enter your favorite English saying: Actions speak LOUDER than words. Number of wovels: 10
Write a Python program using functions and mainline logic which prompts the user to enter a...
Write a Python program using functions and mainline logic which prompts the user to enter a number, then generates that number of random integers and stores them in a file. It should then display the following data to back to the user: The list of integers The lowest number in the list The highest number in the list The total sum of all the numbers in the list The average number in the list At a minimum, the numbers should...
In PYTHON OF JUPIDER NOTEBOOK Write a program that prompts the user to enter his/her nationality...
In PYTHON OF JUPIDER NOTEBOOK Write a program that prompts the user to enter his/her nationality (French/french, Italian/italian, or Spanish/spanish). Then ask his/her name using a prompt message in his/her own language (use Google Translate if you need). After getting the name, again greet him/her using a greeting message in his/her own language. If the user is not from any of the above nationalities just use English to prompt for name and to greet the user. Example 1: Nationality? french...
Include<stdio.h> In C program Write a program that prompts the user to enter an integer value....
Include<stdio.h> In C program Write a program that prompts the user to enter an integer value. The program should then output a message saying whether the number is positive, negative, or zero.
Write a C++ program which prompts the user to enter an integer value, stores it into...
Write a C++ program which prompts the user to enter an integer value, stores it into a variable called ‘num’, evaluates the following expressions and displays results on screen. num+5, num-3, (num+3) – 2, ((num+5)*2 / (num+3)) For performing addition and subtraction, you are allowed to use ONLY the increment and decrement operators (both prefixing and postfixing are allowed). You must remember that using increment/decrement operators changes the original value of a number. Indent your code and include comments for...
python.Write a python program that prompts the user to enter the year and first day of...
python.Write a python program that prompts the user to enter the year and first day of the year, and displays the first day of each month in the year. For example, if the user entered the year 2020 and 3 for Wednesday, January 1, 2020, your program should display the following output: January 1, 2020 is Wednesday February 1, 2020 is Saturday …… December 1, 2020 is Tuesday
(PYTHON) Write aprogram that prompts user to enter three sides of a triangle....
(PYTHON) Write a program that prompts user to enter three sides of a triangle. The program should determine if the three sides can form a triangle. If the three sides can form a triangle, then determine the type of the triangle.There are three types of triangles: Equilateral triangle (all 3 sides are equal) Isosceles triangle (two sides are equal, the third side is of a different length) Scalene triangle (all 3 sides are of different lengths)   The program should...
Write a program that prompts the user to enter a positive integer and then computes the...
Write a program that prompts the user to enter a positive integer and then computes the equivalent binary number and outputs it. The program should consist of 3 files. dec2bin.c that has function dec2bin() implementation to return char array corresponding to binary number. dec2bin.h header file that has function prototype for dec2bin() function dec2binconv.c file with main function that calls dec2bin and print results. This is what i have so far. Im doing this in unix. All the files compiled...
Problem 4 : Write a program that prompts the user to enter in an integer and...
Problem 4 : Write a program that prompts the user to enter in an integer and then prints as shown in the example below Enter an integer 5 // User enters 5 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Bye
IN C++ Write a program that prompts the user to enter the number of students and...
IN C++ Write a program that prompts the user to enter the number of students and each student’s name and score, and finally displays the student with the highest score (display the student’s name and score). Also calculate the average score and indicate by how much the highest score differs from the average. Use a while loop. Sample Output Please enter the number of students: 4 Enter the student name: Ben Simmons Enter the score: 70 Enter the student name:...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT