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 capitalgain.py to compute and display the total growth yield of an investment on maturity. The growth yield depends on the initial amount invested ie 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 years years base on the portion of the principal that is $ or less, plus base on the portion of the principal over $ up to $ plus base on the portion of the principal over $ up to $ plus base on the portion of the principal over $ base on the portion of the principal that is $ or less, plus base on the portion of the principal over $ up to $ plus base on the portion of the principal over $ base on the portion of the principal that is $ or less, plus base on the portion of the principal over $ The expected inputoutput behavior of the program is illustrated below for two example inputs:
Enter principal amount: Enter base rate: Enter duration number of years: Growth: $
Enter principal amount: Enter base rate: Enter duration number of years: Growth: $Write a Python program called capitalgain.py to compute and display the total growth yield of an investment on maturity. The growth yield depends on the initial amount invested ie 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.
tableYears years years table base on the portion ofthe principal that is$ or less, plus base on theportion of the principalover $ up to$ plus base on theportion of the principalover $ up to$ plus base on the portionof the principal over$table base on the portionof the principal that is$ or less, plus base on theportion of the principalover $ up to$ plus base on the portion ofthe principal over$table base on theportion of the principalthat is $ or less,plus base on the portionof the principal over$
The expected inputoutput behavior of the program is illustrated below for two example inputs:
Enter principal amount:
Enter base rate :
Enter duration number of years:
Growth: $
Enter principal amount:
Enter base rate:
Enter duration number of years:
Growth: $
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
