Skip to content

Commit 95078db

Browse files
committed
Added plans for the while, set, and for loop tutorials
1 parent d11caab commit 95078db

2 files changed

Lines changed: 64 additions & 10 deletions

File tree

Python_Basics/Intro/.ipynb_checkpoints/Python3Basics_Part1-checkpoint.ipynb

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,7 @@
13351335
},
13361336
{
13371337
"cell_type": "code",
1338-
"execution_count": 87,
1338+
"execution_count": 1,
13391339
"metadata": {},
13401340
"outputs": [
13411341
{
@@ -1351,16 +1351,27 @@
13511351
"7\n",
13521352
"8\n",
13531353
"9\n",
1354-
"10\n"
1354+
"10\n",
1355+
"0 steve\n",
1356+
"1 rachel\n",
1357+
"2 michael\n",
1358+
"3 adam\n",
1359+
"4 monica\n"
13551360
]
13561361
}
13571362
],
13581363
"source": [
13591364
"# Range forms a list. \n",
1360-
"# Mention difference between python \n",
1365+
"# Mention difference between python 2 and 3 for range function\n",
1366+
"# mention xrange in python 2, \n",
1367+
"# mention enumerate for loop \n",
13611368
"\n",
13621369
"for i in range(1,11):\n",
1363-
" print(i)"
1370+
" print(i)\n",
1371+
"\n",
1372+
"bunnies = ['steve', 'rachel', 'michael', 'adam', 'monica']\n",
1373+
"for index, bunny in enumerate(bunnies):\n",
1374+
" print(index,bunny)"
13641375
]
13651376
},
13661377
{
@@ -1390,7 +1401,10 @@
13901401
"\n",
13911402
"while i<3:\n",
13921403
" i = i + 1\n",
1393-
" print(i)"
1404+
" print(i)\n",
1405+
" \n",
1406+
"# Task see DSE 200\n",
1407+
"# Write a program to make a list of all prime numbers less than 3000. A prime number can only be divided evenly by 1 and itself."
13941408
]
13951409
},
13961410
{
@@ -1548,6 +1562,19 @@
15481562
"source": [
15491563
"https://www.youtube.com/watch?v=JqGjkNzzU4s"
15501564
]
1565+
},
1566+
{
1567+
"cell_type": "code",
1568+
"execution_count": null,
1569+
"metadata": {
1570+
"collapsed": true
1571+
},
1572+
"outputs": [],
1573+
"source": [
1574+
"# Tuples (see DSE 200 ASSIGNMENT 1, fibonacci, and plus string manip ) and \n",
1575+
"\n",
1576+
"# Sets: intersection, union, embed picture of both showing how similar to join "
1577+
]
15511578
}
15521579
],
15531580
"metadata": {

Python_Basics/Intro/Python3Basics_Part1.ipynb

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,7 @@
13351335
},
13361336
{
13371337
"cell_type": "code",
1338-
"execution_count": 87,
1338+
"execution_count": 1,
13391339
"metadata": {},
13401340
"outputs": [
13411341
{
@@ -1351,16 +1351,27 @@
13511351
"7\n",
13521352
"8\n",
13531353
"9\n",
1354-
"10\n"
1354+
"10\n",
1355+
"0 steve\n",
1356+
"1 rachel\n",
1357+
"2 michael\n",
1358+
"3 adam\n",
1359+
"4 monica\n"
13551360
]
13561361
}
13571362
],
13581363
"source": [
13591364
"# Range forms a list. \n",
1360-
"# Mention difference between python \n",
1365+
"# Mention difference between python 2 and 3 for range function\n",
1366+
"# mention xrange in python 2, \n",
1367+
"# mention enumerate for loop \n",
13611368
"\n",
13621369
"for i in range(1,11):\n",
1363-
" print(i)"
1370+
" print(i)\n",
1371+
"\n",
1372+
"bunnies = ['steve', 'rachel', 'michael', 'adam', 'monica']\n",
1373+
"for index, bunny in enumerate(bunnies):\n",
1374+
" print(index,bunny)"
13641375
]
13651376
},
13661377
{
@@ -1390,7 +1401,10 @@
13901401
"\n",
13911402
"while i<3:\n",
13921403
" i = i + 1\n",
1393-
" print(i)"
1404+
" print(i)\n",
1405+
" \n",
1406+
"# Task see DSE 200\n",
1407+
"# Write a program to make a list of all prime numbers less than 3000. A prime number can only be divided evenly by 1 and itself."
13941408
]
13951409
},
13961410
{
@@ -1548,6 +1562,19 @@
15481562
"source": [
15491563
"https://www.youtube.com/watch?v=JqGjkNzzU4s"
15501564
]
1565+
},
1566+
{
1567+
"cell_type": "code",
1568+
"execution_count": null,
1569+
"metadata": {
1570+
"collapsed": true
1571+
},
1572+
"outputs": [],
1573+
"source": [
1574+
"# Tuples (see DSE 200 ASSIGNMENT 1, fibonacci, and plus string manip ) and \n",
1575+
"\n",
1576+
"# Sets: intersection, union, embed picture of both showing how similar to join "
1577+
]
15511578
}
15521579
],
15531580
"metadata": {

0 commit comments

Comments
 (0)