Update app.py
Browse files
app.py
CHANGED
@@ -53,4 +53,16 @@ if st.button("Calculate"):
|
|
53 |
if num1 > 0:
|
54 |
result = np.log(num1)
|
55 |
else:
|
56 |
-
st.error("Logarithm undefined for non-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
if num1 > 0:
|
54 |
result = np.log(num1)
|
55 |
else:
|
56 |
+
st.error("Logarithm undefined for non-positive values.")
|
57 |
+
elif operation == "Sine":
|
58 |
+
result = np.sin(np.radians(num1))
|
59 |
+
elif operation == "Cosine":
|
60 |
+
result = np.cos(np.radians(num1))
|
61 |
+
elif operation == "Tangent":
|
62 |
+
result = np.tan(np.radians(num1))
|
63 |
+
except Exception as e:
|
64 |
+
st.error(f"An error occurred: {e}")
|
65 |
+
|
66 |
+
# Display result
|
67 |
+
if result is not None:
|
68 |
+
st.success(f"Result: {result}")
|