Simple interest in Python
Python program to get Principle amount, number of months, rate of interest from user and calculate
simple interest.
Sample Input 1:
5000 12 1.0
Sample Output 1:
600.00
Program or Solution
p=float(input("Enter the Principal amount:"))
n=int(input("Enter the Number of Months:"))
r=float(input("Enter the rate of interest:"))
si=(p*n*r)/100
print("Simple Interest: {}".format(si))
Program Explanation
Get principal p, number of months n and rate of intereset r as inputs.
(using input() statement) calculate Simple Intereset SI by formula SI= p*n*r/100 print Simple Interest SI using print() method.
Comments
Related Programs
- Python Addition
- Python Subtraction
- Python Multiplication
- Python Division
- Python Integer Division
- Python Modulus
- Python Exponentiation
- Kilometer to Meter in Python
- Meters to Kilo Meters in Python
- Area of Square in Python
- Area of Rectangle in Python
- Area of Right angled triangle in Python
- Area of triangle in Python
- Area of Circle in Python
- Circumference of Circle in Python
- Calculate Salary of Employee in Python
- Kilobytes to bytes in Python
- Bytes to kilobytes in Python
- Fahrenheit to Celsius in Python
- Celsius to Fahrenheit in Python
- Swap two numbers in Python
- Last Digit of integer in Python
- Set a bit in Python | Reset a bit in Python
- Python Xor
- Python Left shift Operator
- Python Right Shift Operator
- Python Bitwise AND
- Python Bitwise OR
- Python Complement Operator
coming Soon
coming Soon