Define a function to calculate the values

Assignment Help Python Programming
Reference no: EM13161322

 

Write a python program that lets the user enter the loan amount and loan period in number of years. The program will then display the monthly and total payments for each interest rate starting from 4 to 8 in increments of 1.

Be sure to define a function to calculate the values and print the table displaying the interest rate in the first column, the monthly payment in the second column, and the total payment in the third column. Your program should not allow the user to enter negative amounts for the loan amount and the loan period.

Once the table has been displayed the user should be prompted as to whether they wish to enter another loan amount and loan period. Save this program as Lab4Problem1.py

Necessary formulas:

Using the pow function from the math module:

monthlyPayment = loanAmt * monthlyRate / (1 - math.pow(1 / (1 + monthlyRate), numYears * 12))

totalPayment = monthlyPayment * numYears * 12

 

 

Reference no: EM13161322

Questions Cloud

What are the causes and effect of the disease malaria : What are the causes and effect of the disease malaria?
A palindrome is a number : A palindrome is a number or text phrase that reads the same backward as forward. For example, each of the following five-digit integers is a palindrome: 12321, 55555, 34543 and 11611. Write a program that reads in a five-digit integer and determines ..
In which phase can cryptic growth sometimes occur : In which phase can "cryptic growth" sometimes occur?
State component in the original mixture : How do I find the weight percent of each component in the original mixture and would this affect the outcome if Methanol had been used in place of the dichloromethane? Product weight of Oil: 0.11g & Product weight of Polypropylene Glycol : 0.19g.
Define a function to calculate the values : Be sure to define a function to calculate the values and print the table displaying the interest rate in the first column, the monthly payment in the second column, and the total payment in the third column. Your program should not allow the user to ..
Colonial violence in the last quarter of the 17th century : Colonial violence in the last quarter of the 17th century most clearly led to:  the Glorious Revolution.  tighter control over the colonies by the mother country.
Huge integer class : Huge Integer Class) Create a class HugeInteger which uses a 40-element array of digits to store integers as large as 40 digits each. Provide methods parse, toString, add and subtract. Method parse should receive a String, extract each digit using met..
Structs in an array of employee data. : Below is the instructions of my C++ Lab. The program must build in Microsoft Visual C++. Please use headers so the program will compile
Explain blue complex formed between starches and iodine : The blue color of dextran blue solution is due to the well-known, blue complex formed between starches and iodine. If you only had the absorption spectrum of this solution

Reviews

Write a Review

Python Programming Questions & Answers

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Code for the haunted house game

Improve the game by adding more features, for example you can examine more items, more props etc. You may implement this using more lists regarding items and props, remember, you should check if the object is being carried or in the location of th..

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Design a function that accepts an integer

Design a function that accepts an integer argument and returns the sum of all the integers from 1 up to the number passed as an argument. For example, if 50 is passed as an argument, the function will return the sum of 1, 2, 3, 4, . . . 50. Use recur..

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd