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 5, Problem 12PE
Program Plan Intro

Program to print a formatted table that tracks the value of investment

Program plan

  • In the function “main()”,
    • Print the statement “The program calculates future value of a 10 year investment”.
    • Define the variables “principal” and “apr” and get inputs from the user to get the initial principal and annual interest rate.
    • Execute “for” loop and if variable “i” is in the range of “10”
      • Then calculate principal rate.
    • Print the formatted table that tracks the value of investment.
  • Call the function “main()”.

Blurred answer
Students have asked these similar questions
write a program that read an excel sheet that contains some animals' information. The information consists of animal name, its weight in N, its height in m, and its availability in Iraq. The program will ask the user to select one of the available animals, then print the corresponding .information
Write the part of the program that searches for the name of the coffee add-in(s) and either prints the name and price of the add-in or prints the error message if the add-in is not found. Comments in the code tell you where to write the statements. Write the code that searches the list for the name of the add-in ordered by the customer. Write the code that prints the name and price of the add-in or the error message, and then write the code that prints the cost of the total order. Execute the program using the following data and verify that the output is correct: Cream Caramel Whiskey chocolate Chocolate Cinnamon Vanilla     # JumpinJava.py - This program looks up and prints the names and prices of coffee orders.   # Input:  Interactive # Output:  Name and price of coffee orders or error message if add-in is not found    # Declare variables. NUM_ITEMS = 5 # Named constant   # Initialized list of add-ins addIns = ["Cream", "Cinnamon", "Chocolate", "Amaretto", "Whiskey"]   #…
Please use python codes and don't copy from previous answers
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
Constants, Variables, Data types, Keywords in C Programming Language Tutorial; Author: LearningLad;https://www.youtube.com/watch?v=d7tdL-ZEWdE;License: Standard YouTube License, CC-BY