AmnaHassan commited on
Commit
0f8360f
·
verified ·
1 Parent(s): b30016c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
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-pos
 
 
 
 
 
 
 
 
 
 
 
 
 
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}")