Skip to content

Commit df82206

Browse files
committed
While and Range
1 parent 5be4810 commit df82206

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

Loops.ipynb

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,54 @@
8282
" print(jelly+jelly)"
8383
]
8484
},
85+
{
86+
"cell_type": "code",
87+
"execution_count": 6,
88+
"metadata": {},
89+
"outputs": [
90+
{
91+
"name": "stdout",
92+
"output_type": "stream",
93+
"text": [
94+
"i is: 1\n",
95+
"i is: 1\n",
96+
"i is: 2\n",
97+
"i is: 2\n",
98+
"i is: 3\n",
99+
"i is: 3\n",
100+
"i is: 4\n",
101+
"i is: 4\n"
102+
]
103+
}
104+
],
105+
"source": [
106+
"i = 1\n",
107+
"while i < 5:\n",
108+
" print('i is: {}'.format(i))\n",
109+
" print(\"i is: \"+str(i))\n",
110+
" i = i+1"
111+
]
112+
},
113+
{
114+
"cell_type": "code",
115+
"execution_count": 7,
116+
"metadata": {},
117+
"outputs": [
118+
{
119+
"data": {
120+
"text/plain": [
121+
"range(0, 5)"
122+
]
123+
},
124+
"execution_count": 7,
125+
"metadata": {},
126+
"output_type": "execute_result"
127+
}
128+
],
129+
"source": [
130+
"range(5)"
131+
]
132+
},
85133
{
86134
"cell_type": "code",
87135
"execution_count": null,

0 commit comments

Comments
 (0)