ahorro=float(input("Ingrese el valor ahorrado en COP: "))
if 100000 <= ahorro <= 500000:
interes = 0.02
elif 501000 <= ahorro <= 1000000:
interes = 0.04
elif 1001000 <= ahorro <= 2000000:
interes = 0.06
elif ahorro > 2001000:
interes = 0.10
else:
interes = 0
print("El monto ingresado no genera intereses.")
ganancia = ahorro * interes
total = ahorro + ganancia
if interes > 0:
print(f"Intereses generados: ${ganancia:,.2f} COP")
print(f"Total al finalizar el año: ${total:,.2f} COP")
To embed this project on your website, copy the following code and paste it into your website's HTML: