Spaces:
Runtime error
Runtime error
Commit
•
8069421
1
Parent(s):
a6f8c81
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import numpy as np
|
2 |
import matplotlib.pyplot as plt
|
3 |
|
@@ -18,16 +19,15 @@ def graficar_cashflow(cashflow):
|
|
18 |
plt.xlabel('Mes')
|
19 |
plt.ylabel('Saldo')
|
20 |
plt.grid(True)
|
21 |
-
|
22 |
|
23 |
def main():
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
28 |
|
29 |
-
|
30 |
-
|
31 |
|
32 |
-
if __name__ == "__main__":
|
33 |
-
main()
|
|
|
1 |
+
import streamlit as st
|
2 |
import numpy as np
|
3 |
import matplotlib.pyplot as plt
|
4 |
|
|
|
19 |
plt.xlabel('Mes')
|
20 |
plt.ylabel('Saldo')
|
21 |
plt.grid(True)
|
22 |
+
st.pyplot()
|
23 |
|
24 |
def main():
|
25 |
+
st.title('Calculadora de Cashflow')
|
26 |
+
n = st.number_input("Ingrese el número de mensualidades:", min_value=1, step=1, format='%d')
|
27 |
+
A = st.number_input("Ingrese el monto de la mensualidad:", min_value=0.0, step=1.0, format='%f')
|
28 |
+
r = st.number_input("Ingrese la tasa de interés (%):", min_value=0.0, step=0.01, format='%f')
|
29 |
+
Pi = st.number_input("Ingrese el depósito inicial:", min_value=0.0, step=1.0, format='%f')
|
30 |
|
31 |
+
if st.button('Calcular y Graficar Cashflow'):
|
32 |
+
|
33 |
|
|
|
|