dolution

dolution.

Create a class that with data attributes: name, age, money, and interest rate. This class takes values for name, age, and money from user however the interest rate is always 5%. This class has a method that will update the money data attribute based on the interest rate for 1 year using the following formula (money = money + money interest rate). You also need to create a str method for this class that if object is passed to a print function the account state would be printed: (name) has (money) in his/her account

Using this class, take user’s name, age, amount of money to invest, and how many years he or she wants to invest and calculate the amount of money user will have after said number of years. Then pass the object to print function to print the account state.
Sample input:
enter name:Ala
enter age: 25
enter amount of money: 1000
how many years do u wanna invest:
Sample output:
Ala has 1276.2815624999998 in his/her account.

Save your time - order a paper!

Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines

Order Paper Now

dolution

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"