Python Programming: An Introduction to Computer Science, 3rd Ed.
Python Programming: An Introduction to Computer Science, 3rd Ed.
3rd Edition
ISBN: 9781590282755
Author: John Zelle
Publisher: Franklin, Beedle & Associates
bartleby

Concept explainers

bartleby

Videos

Question
Book Icon
Chapter 2, Problem 8PE
Program Plan Intro

Computing compound interest

Program Plan:

  • Declare a main function. Inside the main function,
    • Print the statement.
    • Get the initial amount from the user.
    • Get the interest rate
    • Get the time from the user.
    • Get the years from the user.
    • Calculate the nominal rate
    • Iterate through for loops.
      • Calculate the principal amount.
      • Print the result.
  • Call the main function.

Blurred answer
Students have asked these similar questions
A software company sells a package that retails for $99. Quantity discounts are given according to the following table: Quantity Discount 10 – 19 10% 20 – 49 20% 50 – 99 30% 100 or more 40% Write a program that asks the user to enter the number of packages purchased. The program should then display the full retail price before any discount, the amount of the discount (if any), and the total amount of the purchase after any discount. Do not allow numbers less than 0.
XYZ Company, LLC uses a program to manage the information of their employees. The program gets the name of the employee, number of hours worked and rate per hour. It computes the salary by multiplying the number of hours worked with rate per hour. If the salary is more than 1000, tax is computed as 5% of the salary, otherwise, tax is computed as 2% of the salary. The program will display the name of the employee, salary and tax.
A retail store grants its customers a maximum amount of credit. Each customer’s available credit is his or her maximum amount of credit minus the amount of credit used. Write a program that asks for a customer’s maximum amount of credit and then asks for the amount of credit used. The program should then properly display the customer’s available credit.
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Python Tutorial #10; Math Functions in Python; Author: Art of Engineer;https://www.youtube.com/watch?v=OviXsGf4qmY;License: Standard YouTube License, CC-BY