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 an improved version of the futval . py program from Chapter 2.Your program will prompt the user for the amount of the investment, theannualized interest rate, and the number of years of the investment. Theprogram will then output a nicely formatted table that tracks the value ofthe investment year by year. Your output might look something like this: Year Value----------------0 $2000 . 001 $2200 . 002 $2420 . 003 $2662 . 004 $2928 . 205 $3221 . 026 $3542 . 127 $3897 . 43
Write a program that calculates the amount of money a person would earn over a periodof time if the person's salary is $1 the first day, $2 the second day, and continues to doubleeach day. The program should prompt the user to enter the number of days.Display a table showing what the salary was for each day, then show the total pay at the end of the period. Your result should look like this: Enter the number of days: 4 Day 1 $1 $2 $4 4 $8 2 3 Dollars The total salary for 4 days is: $ 15.using java
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
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
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
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