Upload merge_sort.ipynb
Browse files- merge_sort.ipynb +18 -7
merge_sort.ipynb
CHANGED
@@ -13,13 +13,13 @@
|
|
13 |
" texts:\n",
|
14 |
" input: text\n",
|
15 |
" label: Enter numbers to sort separated by comma\n",
|
16 |
-
" value: 5,2,19,3,6,
|
17 |
"---"
|
18 |
]
|
19 |
},
|
20 |
{
|
21 |
"cell_type": "code",
|
22 |
-
"execution_count":
|
23 |
"id": "77d54c3d-3582-4398-be8c-346baba005e4",
|
24 |
"metadata": {},
|
25 |
"outputs": [],
|
@@ -39,7 +39,7 @@
|
|
39 |
},
|
40 |
{
|
41 |
"cell_type": "code",
|
42 |
-
"execution_count":
|
43 |
"id": "afd50440-2a60-4e9e-a2dc-783a996ddef7",
|
44 |
"metadata": {},
|
45 |
"outputs": [],
|
@@ -52,13 +52,24 @@
|
|
52 |
},
|
53 |
{
|
54 |
"cell_type": "code",
|
55 |
-
"execution_count":
|
56 |
"id": "81f4c406-8b10-423b-947a-ab5c09cd21fe",
|
57 |
"metadata": {},
|
58 |
-
"outputs": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
"source": [
|
60 |
-
"
|
61 |
-
"texts = (texts[0].value).split(',')\n",
|
62 |
"texts = [int(t) for t in texts]"
|
63 |
]
|
64 |
},
|
|
|
13 |
" texts:\n",
|
14 |
" input: text\n",
|
15 |
" label: Enter numbers to sort separated by comma\n",
|
16 |
+
" value: 5,2,19,3,6,100\n",
|
17 |
"---"
|
18 |
]
|
19 |
},
|
20 |
{
|
21 |
"cell_type": "code",
|
22 |
+
"execution_count": 63,
|
23 |
"id": "77d54c3d-3582-4398-be8c-346baba005e4",
|
24 |
"metadata": {},
|
25 |
"outputs": [],
|
|
|
39 |
},
|
40 |
{
|
41 |
"cell_type": "code",
|
42 |
+
"execution_count": 65,
|
43 |
"id": "afd50440-2a60-4e9e-a2dc-783a996ddef7",
|
44 |
"metadata": {},
|
45 |
"outputs": [],
|
|
|
52 |
},
|
53 |
{
|
54 |
"cell_type": "code",
|
55 |
+
"execution_count": 61,
|
56 |
"id": "81f4c406-8b10-423b-947a-ab5c09cd21fe",
|
57 |
"metadata": {},
|
58 |
+
"outputs": [
|
59 |
+
{
|
60 |
+
"ename": "AttributeError",
|
61 |
+
"evalue": "'list' object has no attribute 'split'",
|
62 |
+
"output_type": "error",
|
63 |
+
"traceback": [
|
64 |
+
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
|
65 |
+
"\u001b[1;31mAttributeError\u001b[0m Traceback (most recent call last)",
|
66 |
+
"Cell \u001b[1;32mIn[61], line 2\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[38;5;66;03m#texts = [int(t.value) for t in texts]\u001b[39;00m\n\u001b[1;32m----> 2\u001b[0m texts \u001b[38;5;241m=\u001b[39m \u001b[43m(\u001b[49m\u001b[43mtexts\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msplit\u001b[49m(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m,\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m 3\u001b[0m texts \u001b[38;5;241m=\u001b[39m [\u001b[38;5;28mint\u001b[39m(t) \u001b[38;5;28;01mfor\u001b[39;00m t \u001b[38;5;129;01min\u001b[39;00m texts]\n",
|
67 |
+
"\u001b[1;31mAttributeError\u001b[0m: 'list' object has no attribute 'split'"
|
68 |
+
]
|
69 |
+
}
|
70 |
+
],
|
71 |
"source": [
|
72 |
+
"texts = (texts).split(',')\n",
|
|
|
73 |
"texts = [int(t) for t in texts]"
|
74 |
]
|
75 |
},
|