Skip to content

Commit dd5f08e

Browse files
committed
Atualizando com novos códigos
1 parent 3d7400a commit dd5f08e

File tree

1 file changed

+105
-7
lines changed

1 file changed

+105
-7
lines changed

Aula6-LaçoFor.ipynb

Lines changed: 105 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"colab": {
66
"name": "Aula 6 - Laço For.ipynb",
77
"provenance": [],
8-
"authorship_tag": "ABX9TyP0xWn0BJ/v0eG3t2cFN0aX",
98
"include_colab_link": true
109
},
1110
"kernelspec": {
@@ -86,7 +85,7 @@
8685
"metadata": {
8786
"id": "k1t_fVB0M47C"
8887
},
89-
"execution_count": 9,
88+
"execution_count": null,
9089
"outputs": []
9190
},
9291
{
@@ -103,7 +102,7 @@
103102
"id": "hqLf8rgjJ5hN",
104103
"outputId": "218ddab2-63fc-4737-f642-397c7a7b672d"
105104
},
106-
"execution_count": 1,
105+
"execution_count": null,
107106
"outputs": [
108107
{
109108
"output_type": "stream",
@@ -132,7 +131,7 @@
132131
"id": "_gqPp34RKnq9",
133132
"outputId": "582b5a13-77a4-4f00-b2e6-260486fbf7d7"
134133
},
135-
"execution_count": 3,
134+
"execution_count": null,
136135
"outputs": [
137136
{
138137
"output_type": "stream",
@@ -160,7 +159,7 @@
160159
"id": "XPiZ3raBKFnk",
161160
"outputId": "dc23f95f-0d1b-45a3-ef61-13fc5ca39ada"
162161
},
163-
"execution_count": 2,
162+
"execution_count": null,
164163
"outputs": [
165164
{
166165
"output_type": "stream",
@@ -198,7 +197,7 @@
198197
"id": "H9orSLXFKR2F",
199198
"outputId": "dd834b74-405e-45f3-f193-d49e01ff9f8d"
200199
},
201-
"execution_count": 7,
200+
"execution_count": null,
202201
"outputs": [
203202
{
204203
"output_type": "stream",
@@ -244,7 +243,7 @@
244243
"id": "TF20SgmDMrtT",
245244
"outputId": "594ee15d-5fd0-453c-a906-ea29e6095ae0"
246245
},
247-
"execution_count": 8,
246+
"execution_count": null,
248247
"outputs": [
249248
{
250249
"output_type": "stream",
@@ -264,6 +263,105 @@
264263
]
265264
}
266265
]
266+
},
267+
{
268+
"cell_type": "markdown",
269+
"source": [
270+
"Para você utilizar For com mensagems mais apuradas:"
271+
],
272+
"metadata": {
273+
"id": "fw5pm6f3QpMg"
274+
}
275+
},
276+
{
277+
"cell_type": "code",
278+
"source": [
279+
"tmsigirls = ['amne', 'dora', 'andressa', 'camille']\n",
280+
"for hello in tmsigirls:\n",
281+
" print (\"Olá,\", tmsigirls.title())"
282+
],
283+
"metadata": {
284+
"id": "8wwS2pETQobI",
285+
"outputId": "96af594a-e2e2-4a85-818f-717bcde36a23",
286+
"colab": {
287+
"base_uri": "https://localhost:8080/"
288+
}
289+
},
290+
"execution_count": 3,
291+
"outputs": [
292+
{
293+
"output_type": "stream",
294+
"name": "stdout",
295+
"text": [
296+
"Olá, Amne\n",
297+
"Olá, Dora\n",
298+
"Olá, Andressa\n",
299+
"Olá, Camille\n"
300+
]
301+
}
302+
]
303+
},
304+
{
305+
"cell_type": "markdown",
306+
"source": [
307+
"Progressões Aritméticas com o range()"
308+
],
309+
"metadata": {
310+
"id": "T_u_dWx4RxWG"
311+
}
312+
},
313+
{
314+
"cell_type": "code",
315+
"source": [
316+
"for i in range(4,10):\n",
317+
" print(i)"
318+
],
319+
"metadata": {
320+
"id": "eP_4u0W9Rxse",
321+
"outputId": "d84c0e1a-49d9-41b4-80d3-91a99af599ac",
322+
"colab": {
323+
"base_uri": "https://localhost:8080/"
324+
}
325+
},
326+
"execution_count": 6,
327+
"outputs": [
328+
{
329+
"output_type": "stream",
330+
"name": "stdout",
331+
"text": [
332+
"4\n",
333+
"6\n",
334+
"8\n"
335+
]
336+
}
337+
]
338+
},
339+
{
340+
"cell_type": "code",
341+
"source": [
342+
"#pulando de 2 em 2, é possível fazer o terceiro valor qualquer valor.\n",
343+
"for i in range(4,10,2):\n",
344+
" print(i)"
345+
],
346+
"metadata": {
347+
"id": "nCiy8lFhSBjP",
348+
"outputId": "5675aef1-d321-4113-df2c-fab8f41f316b",
349+
"colab": {
350+
"base_uri": "https://localhost:8080/"
351+
}
352+
},
353+
"execution_count": 7,
354+
"outputs": [
355+
{
356+
"output_type": "stream",
357+
"name": "stdout",
358+
"text": [
359+
"4\n",
360+
"6\n",
361+
"8\n"
362+
]
363+
}
364+
]
267365
}
268366
]
269367
}

0 commit comments

Comments
 (0)