B.Tech Students: Apply for Live Programming Internship C, C++, Java, Python ,Web page Designing, PHP Simple Interest in Python | LiveCodeProgramming

Simple Interest in Python

Simple Interest is calculated using the formula: SI = (P * R * T) / 100, where P is principal, R is rate, and T is time. We'll use this formula to write Python programs.

Simple Interest का formula है: SI = (P * R * T) / 100, जहाँ P principal, R rate और T time होता है। इस formula से Python programs बनाएँगे।

Example 1: Calculate Simple Interest (Static Values)
P = 1000
R = 5
T = 2
SI = (P * R * T) / 100
print("Simple Interest =", SI)

Output:

Simple Interest = 100.0

Calculates SI using fixed values.

Fixed values से SI निकालता है।

Example 2: Simple Interest from User Input
P = float(input("Enter Principal: ") )
R = float(input("Enter Rate of Interest: ") )
T = float(input("Enter Time (years): ") )
SI = (P * R * T) / 100
print("Simple Interest =", SI)

Output:

Enter Principal: 2000
Enter Rate of Interest: 4
Enter Time (years): 3
Simple Interest = 240.0

Takes input from user and calculates SI.

यूज़र से input लेकर SI calculate करता है।

Example 3: SI and Total Amount
P = float(input("Enter Principal: ") )
R = float(input("Enter Rate of Interest: ") )
T = float(input("Enter Time (years): ") )
SI = (P * R * T) / 100
Total = P + SI
print("Simple Interest =", SI)
print("Total Amount =", Total)

Output:

Enter Principal: 1500
Enter Rate of Interest: 6
Enter Time (years): 2
Simple Interest = 180.0
Total Amount = 1680.0

Also prints total after interest.

Interest के बाद total भी print करता है।