Update app.py
Browse files
app.py
CHANGED
|
@@ -28,6 +28,13 @@ def start_iteration(a):
|
|
| 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)
|
|
@@ -49,4 +56,11 @@ if radio_bar == description2 :
|
|
| 49 |
if all_data:
|
| 50 |
result = start_iteration(first_num)
|
| 51 |
st.success(result)
|
| 52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
num_set.append(temp+temp-1)
|
| 29 |
temp = temp + 1
|
| 30 |
return(num_set)
|
| 31 |
+
|
| 32 |
+
def even_index(str1):
|
| 33 |
+
str_lst = []
|
| 34 |
+
for i in range(len(str1)):
|
| 35 |
+
if i % 2 == 0 :
|
| 36 |
+
str_lst.append(str1[i])
|
| 37 |
+
return(str_lst)
|
| 38 |
|
| 39 |
|
| 40 |
st.markdown("<h3 style='text-align:center; font-size:24px;'>Mathematical and String Operations</h3>", unsafe_allow_html=True)
|
|
|
|
| 56 |
if all_data:
|
| 57 |
result = start_iteration(first_num)
|
| 58 |
st.success(result)
|
| 59 |
+
|
| 60 |
+
if radio_bar == description3 :
|
| 61 |
+
st.markdown("<h6 style='text-align:center; font-size:16px;'>"+description3+"</h6>", unsafe_allow_html=True)
|
| 62 |
+
str1 = st.text_input(label="Enter the string",value=0)
|
| 63 |
+
all_data = st.button("Show result")
|
| 64 |
+
if all_data:
|
| 65 |
+
result = even_index(str1)
|
| 66 |
+
st.success(result)
|