Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Unlimited Attempts AllowedUnlimited Attempts Allowed Details Introduction Control flow statements form the basis of all programming tasks. You will find yourself using if statements, for

Unlimited Attempts AllowedUnlimited Attempts Allowed
Details
Introduction
Control flow statements form the basis of all programming tasks. You will find yourself using if statements, for-loops and while-loops throughout your
programming career. This week we will use our if statements and loops to build a simple future value calculator that will tell the user their expected
account balance and interest earned each year.
Expectations
Your program should do the following tasks:
Ask user for their initial investment, expected interest rate, and the number of years they plan to invest
Print an error message if any of these inputs are negative or non-numerical values
Print the annual interest and balance to the screen for each year from 1 to N, where N is the number of years the investor plans to invest
Print the ending balance and a message indicating this will be the final balance
Ask the user if they want to continue (i.e. re-run the program using new inputs)
(Optional-Extra Credit) Add functionality to the calculator that allows the user to add a fixed additional principal amount to their account each year
Details
Introduction
Control flow statements form the basis of all programming tasks. You will find yourself using if statements, for-loops and while-loops throughout your
programming career. This week we will use our if statements and loops to build a simple future value calculator that will tell the user their expected
account balance and interest earned each year.
Expectations
Your program should do the following tasks:
Ask user for their initial investment, expected interest rate, and the number of years they plan to invest
Print an error message if any of these inputs are negative or non-numerical values
Print the annual interest and balance to the screen for each year from 1 to N, where N is the number of years the investor plans to invest
Print the ending balance and a message indicating this will be the final balance
Ask the user if they want to continue (i.e. re-run the program using new inputs)
(Optional-Extra Credit) Add functionality to the calculator that allows the user to add a fixed additional principal amount to their account each year
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions

Question

2. Compare the sales and service departments at Auto World.

Answered: 1 week ago