Update app.py
Browse files
app.py
CHANGED
|
@@ -18,6 +18,18 @@ def sum_of_two(a,b):
|
|
| 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 |
st.write("---")
|
| 23 |
radio_bar = st.sidebar.radio(options=[description1, description2, description3, description4, description5, description6, description7, description8, description9], label="Select any one:")
|
|
@@ -28,4 +40,13 @@ if radio_bar == description1:
|
|
| 28 |
all_data = st.button("Calculate result")
|
| 29 |
if all_data:
|
| 30 |
result = sum_of_two(first_num,second_num)
|
| 31 |
-
st.success(result)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
else:
|
| 19 |
return(sum1)
|
| 20 |
|
| 21 |
+
def start_iteration(a):
|
| 22 |
+
num_set = []
|
| 23 |
+
temp = a
|
| 24 |
+
for i in range(a,a+10):
|
| 25 |
+
if temp == a:
|
| 26 |
+
num_set.append(temp)
|
| 27 |
+
else:
|
| 28 |
+
num_set.append(temp+temp-1)
|
| 29 |
+
temp = temp + 1
|
| 30 |
+
return(num_set)
|
| 31 |
+
|
| 32 |
+
|
| 33 |
st.markdown("<h3 style='text-align:center; font-size:24px;'>Mathematical and String Operations</h3>", unsafe_allow_html=True)
|
| 34 |
st.write("---")
|
| 35 |
radio_bar = st.sidebar.radio(options=[description1, description2, description3, description4, description5, description6, description7, description8, description9], label="Select any one:")
|
|
|
|
| 40 |
all_data = st.button("Calculate result")
|
| 41 |
if all_data:
|
| 42 |
result = sum_of_two(first_num,second_num)
|
| 43 |
+
st.success(result)
|
| 44 |
+
|
| 45 |
+
if radio_bar == description2 :
|
| 46 |
+
st.markdown("<h6 style='text-align:center; font-size:16px;'>"+description2+"</h6>", unsafe_allow_html=True)
|
| 47 |
+
first_num = st.number_input(label="Enter Starting Number",value=0)
|
| 48 |
+
all_data = st.button("Show result")
|
| 49 |
+
if all_data:
|
| 50 |
+
result = start_iteration(first_num)
|
| 51 |
+
st.success(result)
|
| 52 |
+
|