logo CodeStepByStep logo

investment

Language/Type: Python interactive programs parameters

Write a console program that calculates money earned by two investors. Use the following compound interest formula:

PV * (1 + r)n = FV

Also report the overall "quality" of the investment as from the table below:

Profit Category
0 - 10% weak
10 - 50% medium
over 50% strong

Match the following example output log (with user input shown like this):

Investor 1
Initial amount? 100.00
Interest rate%? .03
Num. of months? 5
Amount: $ 115.93
Profit: $ 15.93 = 16 %
Medium

Investor 2
Initial amount? 5.25
Interest rate? .08
Num. of months? 24
Amount: $ 33.29
Profit: $ 28.04 = 534 %
Strong

Have a nice day!

You should break down your program into several functions, each of which helps solve the overall problem.

Complete program: Write an entire program that you could put into a file and run outside of CodeStepByStep.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.