1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
def money(): capital = int ( input ( 'Input amount of money invested: ' )) percentage = float ( input ( 'Input percentage provided by bank: ' )) days = int ( input ( 'Input amount of days, 30 - month, 360 - year: ' )) capitalisation = int ( input ( 'Capital is capitalised how many times?: ' )) i = 0 while i < capitalisation: profit = (capital * percentage * days / capitalisation) / 36000 capital = capital + profit i + = 1 print ( "You will have:" , capital) again() def again(): calc_again = input ( '''Do you want to calculate again? Please type Y for YES or N for NO: ''' ) if calc_again.upper() = = 'Y' : money() elif calc_again.upper() = = 'N' : print ( 'Thanks for launching.' ) else : print ( 'Enter a valid answer' ) again() money() |
Program calculating intrests
Users browsing this thread: 1 Guest(s)