Python program to calculate simple interest using function

0
600
def interest(principal, time=2, rate=0.10):
    return principal*rate*time
#_____main_______
prin=float(input("Enter principal amount: "))
print("Simple interest with default ROI and time values is: ")
si1=interest(prin)
print("Rs.",si1)
roi=float(input("Enter rate of interest (ROI): "))
time=int(input("Enter time in years: "))
print("Simple interest with your provided ROI and time values is: ")
si2=interest(prin,time,roi/100)
print("Rs.",si2)

   Output 1:
           Enter principal amount: 8300
           Simple interest with default ROI and time values is: 
           Rs. 1660.0
           Enter rate of interest (ROI): 7
           Enter time in years: 5
           Simple interest with your provided ROI and time values is: 
           Rs. 2905.0
   Output 2:
           Enter principal amount: 25000
           Simple interest with default ROI and time values is: 
           Rs. 5000.0
           Enter rate of interest (ROI): 8
           Enter time in years: 2
           Simple interest with your provided ROI and time values is: 
           Rs. 4000.0

इन्हें भी देखें।

Python Programs के लिये यहाँ click करें।

 

 

Python program to calculate simple interest using function program to calculate simple interest using function in python write a program to calculate simple interest using function in python program to calculate simple interest using function write a program to calculate simple interest using function simple interest program in python simple interest program using function simple interest program using function in python program to calculate simple interest using function program to calculate simple interest using functions write a program in python to calculate simple interest using inline function write a program in python to calculate simple interest using function write a program to find simple interest using function write program to calculate simple interest write a program to calculate simple interest calculate simple interest using function in python

LEAVE A REPLY

Please enter your comment!
Please enter your name here