SIP calculator-
Step 1: #Function to calculate SIP Maturity Value
def calculate_sip(principal, rate, time):
# Convert annual rate to a monthly rate
monthly_rate = rate / (12 * 100)
# Total number of months
months = time * 12
# SIP maturity formula
sip_maturity_value = principal * (((1 + monthly_rate) ** months - 1) / monthly_rate) * (1 + monthly_rate)
return sip_maturity_value
#SIP Maturity Value=(P×(((1+r)**n )?1)×(1+r)/r)
step 2: #Get user inputs for principal (monthly investment), rate (annual interest rate), and time (investment duration in years)
principal = float(input("Enter the monthly investment (SIP amount): "))
rate = float(input("Enter the annual interest rate (in %): "))
time = float(input("Enter the time period (in years): "))
step 3: #Calculate the SIP maturity value
maturity_value = calculate_sip(principal, rate, time)
step 4: #Display the result
print(f"The SIP maturity value after {time} years is: {maturity_value:.2f}")
#Programming #Coding #Code #Developer #SoftwareEngineering #100DaysOfCode #Tech #WomenInTech (if applicable) #DataScience #MachineLearning #AI #Python
#PythonProgramming #LearnPython #PythonDeveloper #PythonForDataScience #PythonTips #PythonCode #PythonCommunity