Question: Capital Gain Calculator Write a Python program called capital _ gain.py to compute and display the total growth yield of an investment on maturity. The

Capital Gain Calculator Write a Python program called capital_gain.py to compute and display the total growth yield of an investment on maturity. The growth yield depends on the initial amount invested (i.e. principal), the duration of the investment (the number of years before cashing the growth), and the base growth rate. The principal, investment duration and the base growth rate are to be provided as user inputs to the program. The growth rates are applied yearly on the principal, according to the schedule given below.
Years =55 years =10 years >10 base on the portion of the principal that is $50,000 or less, plus 1.25* base on the portion of the principal over $50,000 up to $100,000, plus 1.5* base on the portion of the principal over $100,000 up to $200,000, plus 2* base on the portion of the principal over $200,000.1.5* base on the portion of the principal that is $150,000 or less, plus 1.75* base on the portion of the principal over $150,000 up to $250,000, plus 2* base on the portion of the principal over $250,0001.75* base on the portion of the principal that is $300,000 or less, plus 2* base on the portion of the principal over $300,000. The expected input/output behavior of the program is illustrated below for two example inputs:
Enter principal amount: 75000 Enter base rate: 0.05 Enter duration (number of years): 5 Growth: $20312.5
Enter principal amount: 100000 Enter base rate: 0.03 Enter duration (number of years): 7 Growth: $31500.0Write a Python program called capital_gain.py to compute and display the total growth yield of an investment on maturity. The growth yield depends on the initial amount invested (i.e. principal), the duration of the investment (the number of years before cashing the growth), and the base growth rate. The principal, investment duration and the base growth rate are to be provided as user inputs to the program. The growth rates are applied yearly on the principal, according to the schedule given below.
\table[[Years =5,5 years =10,years >10],[\table[[- base on the portion of],[the principal that is],[$50,000 or less, plus],[-1.25* base on the],[portion of the principal],[over $50,000 up to],[$100,000, plus],[-1.5* base on the],[portion of the principal],[over $100,000 up to],[$200,000, plus],[-2* base on the portion],[of the principal over],[$200,000.]],\table[[-1.5* base on the portion],[of the principal that is],[$150,000 or less, plus],[-1.75* base on the],[portion of the principal],[over $150,000 up to],[$250,000, plus],[-2* base on the portion of],[the principal over],[$250,000]],\table[[-1.75* base on the],[portion of the principal],[that is $300,000 or less,],[plus],[-,2* base on the portion],[of the principal over],[$300,000.]]]]
The expected input/output behavior of the program is illustrated below for two example inputs:
Enter principal amount: 75000
Enter base rate :0.05
Enter duration (number of years):5
Growth: $20312.5
Enter principal amount: 100000
Enter base rate:0.03
Enter duration (number of years):7
Growth: $31500.0
Capital Gain Calculator Write a Python program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!