Update app.py
Browse files
app.py
CHANGED
|
@@ -18,11 +18,16 @@ def sum_of_two(a,b):
|
|
| 18 |
else:
|
| 19 |
return(sum1)
|
| 20 |
|
| 21 |
-
st.markdown("<
|
| 22 |
radio_bar = st.sidebar.radio(options=[description1, description2, description3, description4, description5, description6, description7, description8, description9], label="Select any one:")
|
| 23 |
if radio_bar == description1:
|
|
|
|
| 24 |
first_num = st.number_input(label="Enter First Number",value=None)
|
| 25 |
second_num = st.number_input(label="Enter Second Number",value=None)
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
else:
|
| 19 |
return(sum1)
|
| 20 |
|
| 21 |
+
st.markdown("<h3 style='text-align:center; font-size:24px;'>Mathematical and String Operations</h3>", unsafe_allow_html=True)
|
| 22 |
radio_bar = st.sidebar.radio(options=[description1, description2, description3, description4, description5, description6, description7, description8, description9], label="Select any one:")
|
| 23 |
if radio_bar == description1:
|
| 24 |
+
st.markdown("<h6 style='text-align:center; font-size:16px;'>{description1}</h6>", unsafe_allow_html=True)
|
| 25 |
first_num = st.number_input(label="Enter First Number",value=None)
|
| 26 |
second_num = st.number_input(label="Enter Second Number",value=None)
|
| 27 |
+
all_data = st.button("Calculate result")
|
| 28 |
+
if all_data:
|
| 29 |
+
if first_num == "" and second_num == "":
|
| 30 |
+
st.warning("Please Fill Above Fields")
|
| 31 |
+
else:
|
| 32 |
+
result = sum_of_two(first_num,second_num)
|
| 33 |
+
st.success(f"Answer = {result}")
|