Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@

A calculator that calculates simple interest given principal, annual rate of interest and time period in years.

```
Input:
p, principal amount
t, time period in years
r, annual rate of interest
Output
simple interest = p*t*r
```

def calcular_interes_simple(p, t, r):
return p * t * r / 100

# Ejemplo de uso
principal = 1000
tiempo = 5
tasa_interes = 8

interes = calcular_interes_simple(principal, tiempo, tasa_interes)
print(f"El interés simple es: {interes}")


_© 2022 XYZ, Inc._