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
Question
Book Icon
Chapter 8, Problem 3PE
Program Plan Intro

Double the investment

Program Plan:

  • Declare a main function. Inside the main function,
    • Get the annualized interest rate and initial principal from the user.
    • Calculate the interest rate.
    • Set the values.
    • Check the principal is greater than “0.5 * p” value.
      • Calculate the years, interest rate, and principal.
      • Display the result.
  • Call the main function.

Blurred answer
Students have asked these similar questions
Write a program that requests the current time and a waiting time as two integers for the number of hours and the number of minutes to wait. The program then outputs what the time will be after the waiting period. Use 24-hour notation for the times. Include a loop that lets the user repeat this calculation for additional input values until the user says she or he wants to end the program. Input Notes:Both the current time and the waiting time are entered in the form HH:MM where HH and MM are integers signifying hours and minutes respectively. In response to the continuation prompts (described below) the user types a y  or a Y  to signify "continue" with any other character signifying "quit". Output Notes (Prompts and Labels):At the outset the program prints the title "Compute completion time from current time and waiting period". The program then prompts for the current time with the prompt "Current time:" followed by the instructions "Enter 24 hour time in the format HH:MM". After…
Write a program that uses loops to collect data and calculate the average score over a number of tests for a number of students. Use Small Basic for this assignment.  The program should : 1. first ask the user to enter the number of students in the range of 1 to 10. 2. then the program asks the user to enter the number of tests (in the range of 1 to  5) 3. Then use a loop to collect the scores for those many tests for each student. The outer loop will iterate once for each student. The inner loop will iterate several times, once for each test. Each iteration of the inner loop will ask the user to enter the score for a test of a student. 3. After all iterations, the program should calculates and display the total scores and average score for each student.
You want to determine the amount you will save for a down payment on a home in the next 3-7 years. You are opening an account with $750. Each year a contribution of $2400 will be made. Assume that there is a 2.75% compound interest rate paid on the balance at the end of the year. Display the year and the savings amount at the end of each year - beginning with the current year. Write your program using a loop that displays the projected savings for each year. (Try using a function that calculates the end of year interest - pass the balance (previous balance plus investment ($2400)), calculate the interest and return the interest amount))
Knowledge Booster
Background pattern image
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