Python Programming: An Introduction to Computer Science, 3rd Ed.
3rd Edition
ISBN: 9781590282755
Author: John Zelle
Publisher: Franklin, Beedle & Associates
expand_more
expand_more
format_list_bulleted
Question
Chapter 2, Problem 6PE
Program Plan Intro
Computing compound interest
- Declare a main function. Inside the main function,
- Print the statement.
- Get the initial amount from the user.
- Get the interest rate form the user.
- Get the number of years form the user.
- Iterate through for loops.
- Calculate the principal amount.
- Print the result.
- Call the main function.
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
Write a program that will Input the name , position of the employee , Input the rate per hour, hours worked. Compute the Gross pay for an employee.
Write a program that computes the rent in five years and the total rent for one year starting five years from now
Write a C++ program which calculates percentage of three subjects and then prints, the student is Fail if marks are less than 50, got D grade if marks are equal to 50 percent or above, student got C grade if marks are 60 percent or above, student got B grade if marks are equal to 70 percent or above and student got A grade if marks are equal to 80 percent or above.
Chapter 2 Solutions
Python Programming: An Introduction to Computer Science, 3rd Ed.
Ch. 2 - Prob. 1TFCh. 2 - Prob. 2TFCh. 2 - Prob. 3TFCh. 2 - Prob. 4TFCh. 2 - Prob. 5TFCh. 2 - Prob. 6TFCh. 2 - Prob. 7TFCh. 2 - Prob. 8TFCh. 2 - Prob. 9TFCh. 2 - Prob. 10TF
Ch. 2 - Prob. 1MCCh. 2 - Prob. 2MCCh. 2 - Prob. 3MCCh. 2 - Prob. 4MCCh. 2 - Prob. 5MCCh. 2 - Prob. 6MCCh. 2 - Prob. 7MCCh. 2 - Prob. 8MCCh. 2 - Prob. 9MCCh. 2 - Prob. 10MCCh. 2 - Prob. 1DCh. 2 - Prob. 3DCh. 2 - Prob. 4DCh. 2 - Prob. 5DCh. 2 - Prob. 6DCh. 2 - Prob. 7DCh. 2 - Prob. 1PECh. 2 - Prob. 2PECh. 2 - Prob. 3PECh. 2 - Prob. 4PECh. 2 - Prob. 5PECh. 2 - Prob. 6PECh. 2 - Prob. 7PECh. 2 - Prob. 8PECh. 2 - Prob. 9PECh. 2 - Prob. 10PECh. 2 - Prob. 11PECh. 2 - Prob. 12PE
Knowledge Booster
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
- Remove some minor error from the given program.Please.arrow_forwardRewrite the program shown in the PNG file so that the program DIALOG will be in your LOCAL DIALECT.arrow_forward(C++) Write a program with total change amount as an integer input, and output the change using the fewest coins, one coin type per line. The coin types are Dollars, Quarters, Dimes, Nickels, and Pennies. Use singular and plural coin names as appropriate, like 1 Penny vs. 2 Penniesarrow_forward
- Write a program that given an amount of change less than $1.00 will print out exactly how many quarters, dimes, nickels, and pennies will be needed to efficiently make that change. [Hint: the // operator may be useful.]arrow_forwardWrite a program that will count the number of votes for each candidate, show the total number of voters, the number of votes, and the percentage of votes made for each college candidate. Show the highest percentage of votesarrow_forward(B) Write a program that reads from the user the values of x and h to implement the equation below. -10x + 2h, √x -h, fx = x < 3 x ≥ 3arrow_forward
- 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 . 43arrow_forwardBy only using two variables, create a program that could interchange two input numbers. For example, the input is 34 and 5, the output should be 5 and 34.arrow_forwardWrite a program where we ask the reader to enter five positive numbers and then print thelargest one. (Hint: first write a input variable for the largest number, then write a range function.The range function should have another input variable for number input. Then do mathematicalcomparisons.)arrow_forward
- Write a program that takes in a year and you need to determines whether that year is a leap year..arrow_forwardwrite a program in C++ to find and print the price that has to be paid afterapplying the discount Total Shopping Amount Discount<=99 No discount>101 & <=200 5%>200 & <=400 10%>411 & <=800 20%>800 25%arrow_forwardAdd something to this program that asks for the age of the babies in months too and then print that out at the end with the last statement.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Java random numbers; Author: Bro code;https://www.youtube.com/watch?v=VMZLPl16P5c;License: Standard YouTube License, CC-BY