Update app.py
Browse files
app.py
CHANGED
|
@@ -55,6 +55,24 @@ def check_palin(check_num):
|
|
| 55 |
else:
|
| 56 |
return("Not Palindrom")
|
| 57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
st.markdown("<h3 style='text-align:center; font-size:24px;'>Mathematical and String Operations</h3>", unsafe_allow_html=True)
|
| 59 |
st.write("---")
|
| 60 |
radio_bar = st.sidebar.radio(options=[description1, description2, description3, description4, description5, description6, description7, description8, description9], label="Select any one:")
|
|
@@ -107,4 +125,13 @@ if radio_bar == description6 :
|
|
| 107 |
all_data = st.button("Check")
|
| 108 |
if all_data:
|
| 109 |
result = check_palin(check_num)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
st.success(result)
|
|
|
|
| 55 |
else:
|
| 56 |
return("Not Palindrom")
|
| 57 |
|
| 58 |
+
def create_new(num_lst1,num_lst2):
|
| 59 |
+
first_lst = []
|
| 60 |
+
sec_lst = []
|
| 61 |
+
fin_lst = []
|
| 62 |
+
for i in range(num_lst1):
|
| 63 |
+
lst_ele1 = st.number_input(label="Element of first list: ",value=0)
|
| 64 |
+
first_lst.append(lst_ele1)
|
| 65 |
+
for j in range(num_lst2):
|
| 66 |
+
lst_ele2 = st.number_input(label="Element of first list: ",value=0)
|
| 67 |
+
sec_lst.append(lst_ele2)
|
| 68 |
+
for x in first_lst:
|
| 69 |
+
if x % 2 == 1:
|
| 70 |
+
fin_lst.append(x)
|
| 71 |
+
for y in sec_lst:
|
| 72 |
+
if y % 2 == 0:
|
| 73 |
+
fin_lst.append(y)
|
| 74 |
+
return(fin_lst)
|
| 75 |
+
|
| 76 |
st.markdown("<h3 style='text-align:center; font-size:24px;'>Mathematical and String Operations</h3>", unsafe_allow_html=True)
|
| 77 |
st.write("---")
|
| 78 |
radio_bar = st.sidebar.radio(options=[description1, description2, description3, description4, description5, description6, description7, description8, description9], label="Select any one:")
|
|
|
|
| 125 |
all_data = st.button("Check")
|
| 126 |
if all_data:
|
| 127 |
result = check_palin(check_num)
|
| 128 |
+
st.success(result)
|
| 129 |
+
|
| 130 |
+
if radio_bar == description7 :
|
| 131 |
+
st.markdown("<h6 style='text-align:center; font-size:16px;'>"+description7+"</h6>", unsafe_allow_html=True)
|
| 132 |
+
num_lst1 = st.number_input(label="Enter First Number:",value=0)
|
| 133 |
+
num_lst2 = st.number_input(label="Enter First Number:",value=0)
|
| 134 |
+
all_data = st.button("Check")
|
| 135 |
+
if all_data:
|
| 136 |
+
result = create_new(num_lst1,num_lst2)
|
| 137 |
st.success(result)
|