Skip to content

Commit 4303e02

Browse files
committed
hello dsa
1 parent d0f45dc commit 4303e02

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

loops.ipynb

+14-5
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
},
103103
{
104104
"cell_type": "code",
105-
"execution_count": null,
105+
"execution_count": 2,
106106
"metadata": {},
107107
"outputs": [
108108
{
@@ -119,9 +119,10 @@
119119
"10\n",
120120
"22\n",
121121
"12\n",
122-
"860 yes\n",
123-
"200 yes\n",
124-
"240 yes\n"
122+
"860 NO\n",
123+
"200 NO\n",
124+
"240 NO\n",
125+
"[22, 12, 4, 10, 43]\n"
125126
]
126127
}
127128
],
@@ -135,7 +136,15 @@
135136
" print (i) \n",
136137
"\n",
137138
"for i in range(len(h)-1,-1,-2):\n",
138-
" print(h[i]*20,'NO')\n"
139+
" print(h[i]*20,'NO')\n",
140+
"\n",
141+
"for i in range(0, len(h) - 1, 2):\n",
142+
" t = h[i]\n",
143+
" h[i] = h[i + 1]\n",
144+
" h[i + 1] = t\n",
145+
"\n",
146+
"print(h)\n",
147+
"\n"
139148
]
140149
},
141150
{

0 commit comments

Comments
 (0)