Vihang28 commited on
Commit
1d2b3c5
·
1 Parent(s): 6921d65

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py CHANGED
@@ -75,6 +75,11 @@ def create_tbl(tbl1,tbl2):
75
  table_lst.append(j*i)
76
  list_of_tbl.append(table_lst)
77
  return(list_of_tbl)
 
 
 
 
 
78
 
79
 
80
  st.markdown("<h3 style='text-align:center; font-size:24px;'>Mathematical and String Operations</h3>", unsafe_allow_html=True)
@@ -147,4 +152,13 @@ if radio_bar == description8 :
147
  all_data = st.button("Show Result")
148
  if all_data:
149
  result = create_tbl(start_num8,end_num8)
 
 
 
 
 
 
 
 
 
150
  st.success(result)
 
75
  table_lst.append(j*i)
76
  list_of_tbl.append(table_lst)
77
  return(list_of_tbl)
78
+
79
+ def find_exp(base1,exp1):
80
+ if exp1 < 0 :
81
+ exp1 = exp1 * (-1)
82
+ return base1**exp1
83
 
84
 
85
  st.markdown("<h3 style='text-align:center; font-size:24px;'>Mathematical and String Operations</h3>", unsafe_allow_html=True)
 
152
  all_data = st.button("Show Result")
153
  if all_data:
154
  result = create_tbl(start_num8,end_num8)
155
+ st.success(result)
156
+
157
+ if radio_bar == description9 :
158
+ st.markdown("<h6 style='text-align:center; font-size:16px;'>"+description9+"</h6>", unsafe_allow_html=True)
159
+ base_num = st.number_input(label="Enter Base Number:",value=0)
160
+ exp_num = st.number_input(label="Enter Exponent:",value=0)
161
+ all_data = st.button("Calculate")
162
+ if all_data:
163
+ result = find_exp(base_num,exp_num)
164
  st.success(result)