Downloads · 30 days
0
Reddy2909/calc
calc is a machine learning model from Reddy2909. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
def calculatesimpleinterest(principal, rate, time): simpleinterest = (principal rate time) / 100 return simpleinterest
Downloads · 30 days
0
Access
Public
Updated Jul 8, 2024
Repo size
—
Likes
0
Public
Click a slice to open those files.
Other1.5 KB · 48%
From the Hugging Face model README
def calculate_simple_interest(principal, rate, time): # Simple Interest formula: SI = (P * R * T) / 100 simple_interest = (principal * rate * time) / 100 return simple_interest
def main(): # Input principal amount principal = float(input("Enter the principal amount: "))
# Input annual interest rate
rate = float(input("Enter the annual interest rate (in %): "))
# Input time period in years
time = float(input("Enter the time period (in years): "))
# Calculate simple interest
interest = calculate_simple_interest(principal, rate, time)
# Print the result
print(f"The simple interest is: {interest}")
if name == "main": main()