3. Write a program using function to calculate the simple interest. Suppose the customer is a senior citizen. She is being offered 15 percent rate of interest; he is being offered 12 percent rate of interest for all other customers, the ROI is 10 percent.
Sample Input:
Enter the principal amount: 200000 Enter the no of years: 3
Gender (m/f): m
Is customer senior citizen (y/n): n Sample Output:
def SimpleInterest(p,r,t):
s_i = (p * r * t) / 100
return s_i
SimpleInterest(200000, 0.15, 3)
900.0
Comments
Leave a comment