Skip to content

Commit a1f3239

Browse files
committed
General fixes and code readability
1 parent f1dcccf commit a1f3239

19 files changed

+461
-1175
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ node_modules/
77
.ipynb_checkpoints
88
*.tsbuildinfo
99
debug.log
10+
content/python.ipynb
1011

1112
# Created by https://www.gitignore.io/api/python
1213
# Edit at https://www.gitignore.io/?templates=python

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
### The goal is to teach basic syntax, programming ideologies and writing quick scripts with Python.
88

9+
### By the end of the class you will be familiar with most Python concepts and will be ready to start coding in Python.
10+
911
### The course instructor will be **Aadithya Varma**.
1012

1113
<hr />
@@ -22,7 +24,7 @@
2224

2325
## ✨ What to expect from the course ✨
2426

25-
- Understand basic usage of Python
27+
- Understand most concepts in Python
2628
- Understand Python programming ideologies
2729
- Write quick scripts using Python
2830

@@ -45,7 +47,7 @@
4547
🎓 Masters in Software Engineering and another Masters in Artificial Intelligence and Machine Learning
4648
🛠️ Worked on backend application development, DevOps, SCM tools and BigData analysis
4749
🌟 Loves to build clean, efficient and scalable systems
48-
😃 Outside of work, I spend my time playing games, watching Anime and TV shows
50+
😃 Outside of work, I spend my time playing games, watching anime and TV shows
4951
</pre>
5052

5153
<hr />

content/00_about_me.ipynb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,14 @@
5858
}
5959
],
6060
"metadata": {
61+
"kernelspec": {
62+
"display_name": ".venv",
63+
"language": "python",
64+
"name": "python3"
65+
},
6166
"language_info": {
62-
"name": "python"
67+
"name": "python",
68+
"version": "3.10.8"
6369
},
6470
"orig_nbformat": 4
6571
},

content/00_about_the_course.ipynb

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
"\n",
1010
"[![lite-badge](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://aannara.github.io/basic-python)\n",
1111
"\n",
12-
"### This is a course made for teaching the basics of Python.\n",
12+
"### This is a completely hands-on course made for teaching the basics of Python.\n",
1313
"\n",
1414
"### The goal is to teach basic syntax, programming ideologies and writing quick scripts with Python.\n",
1515
"\n",
16+
"### By the end of the class you will be familiar with most Python concepts and will be ready to start coding in Python.\n",
17+
"\n",
1618
"### The course instructor will be **Aadithya Varma**.\n",
1719
"\n",
1820
"<hr />\n",
@@ -29,18 +31,12 @@
2931
"\n",
3032
"## ✨ What to expect from the course ✨\n",
3133
"\n",
32-
"- Understand basic usage of Python\n",
34+
"- Understand most concepts in Python\n",
3335
"- Understand Python programming ideologies\n",
3436
"- Write quick scripts using Python\n",
3537
"\n",
3638
"<hr />\n",
3739
"\n",
38-
"## ✨ Get started ✨\n",
39-
"\n",
40-
"### Use this link to get started in your own browser: **[Basic Python course materials](https://aannara.github.io/basic-python)**\n",
41-
"\n",
42-
"<br />\n",
43-
"\n",
4440
"### Running the course contents on your local environment\n",
4541
"\n",
4642
"1. Make sure you have Python installed. Follow the guide in the official Python documentation on how to do it for different operating systems: [Windows](https://docs.python.org/3/using/windows.html#installation-steps), [Mac](https://docs.python.org/3/using/mac.html#getting-and-installing-macpython), or [Unix](https://docs.python.org/3/using/unix.html#getting-and-installing-the-latest-version-of-python) systems.\n",
@@ -69,8 +65,14 @@
6965
}
7066
],
7167
"metadata": {
68+
"kernelspec": {
69+
"display_name": ".venv",
70+
"language": "python",
71+
"name": "python3"
72+
},
7273
"language_info": {
73-
"name": "python"
74+
"name": "python",
75+
"version": "3.10.8"
7476
},
7577
"orig_nbformat": 4
7678
},

content/00_index.ipynb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,14 @@
3737
}
3838
],
3939
"metadata": {
40+
"kernelspec": {
41+
"display_name": ".venv",
42+
"language": "python",
43+
"name": "python3"
44+
},
4045
"language_info": {
41-
"name": "python"
46+
"name": "python",
47+
"version": "3.10.8"
4248
},
4349
"orig_nbformat": 4
4450
},

content/01_python_fundamentals_refresh.ipynb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,24 @@
7878
"<img src=\"./static/run-python.gif\" width=\"700\">"
7979
]
8080
},
81+
{
82+
"attachments": {},
83+
"cell_type": "markdown",
84+
"metadata": {},
85+
"source": [
86+
"## Installing Python in VS Code"
87+
]
88+
},
89+
{
90+
"attachments": {},
91+
"cell_type": "markdown",
92+
"metadata": {},
93+
"source": [
94+
"You can use the VS Code tutorial to install VS Code as your IDE and setup Python in it.\n",
95+
"\n",
96+
"Tutorial URL: https://code.visualstudio.com/docs/python/python-tutorial"
97+
]
98+
},
8199
{
82100
"attachments": {},
83101
"cell_type": "markdown",

content/02_python_basics.ipynb

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
"print(a / b)\n",
173173
"print(a // b)\n",
174174
"print(a ** b)\n",
175-
"print(a % b)\n"
175+
"print(a % b)"
176176
]
177177
},
178178
{
@@ -285,12 +285,62 @@
285285
"outputs": [],
286286
"source": [
287287
"a = 1\n",
288-
"\n",
288+
"print(a)"
289+
]
290+
},
291+
{
292+
"cell_type": "code",
293+
"execution_count": null,
294+
"metadata": {},
295+
"outputs": [],
296+
"source": [
297+
"a = 1\n",
289298
"a += 1 # Same as a = a + 1\n",
299+
"print(a)"
300+
]
301+
},
302+
{
303+
"cell_type": "code",
304+
"execution_count": null,
305+
"metadata": {},
306+
"outputs": [],
307+
"source": [
308+
"a = 1\n",
290309
"a -= 1\n",
291-
"a *= 1\n",
310+
"print(a)"
311+
]
312+
},
313+
{
314+
"cell_type": "code",
315+
"execution_count": null,
316+
"metadata": {},
317+
"outputs": [],
318+
"source": [
319+
"a = 1\n",
320+
"a *= 2\n",
321+
"print(a)"
322+
]
323+
},
324+
{
325+
"cell_type": "code",
326+
"execution_count": null,
327+
"metadata": {},
328+
"outputs": [],
329+
"source": [
330+
"a = 1\n",
292331
"a &= 1\n",
293-
"a >>= 1"
332+
"print(a)"
333+
]
334+
},
335+
{
336+
"cell_type": "code",
337+
"execution_count": null,
338+
"metadata": {},
339+
"outputs": [],
340+
"source": [
341+
"a = 8\n",
342+
"a >>= 1\n",
343+
"print(a)"
294344
]
295345
},
296346
{
@@ -416,6 +466,7 @@
416466
"metadata": {},
417467
"outputs": [],
418468
"source": [
469+
"a = \"3\"\n",
419470
"print(a + \"2\")"
420471
]
421472
},

content/03_lists_tuples_sets_dictionaries.ipynb

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,15 @@
4343
"outputs": [],
4444
"source": [
4545
"print(a)\n",
46-
"print(a[0])\n",
46+
"print(a[0])"
47+
]
48+
},
49+
{
50+
"cell_type": "code",
51+
"execution_count": null,
52+
"metadata": {},
53+
"outputs": [],
54+
"source": [
4755
"a[1] = 10\n",
4856
"print(a)"
4957
]
@@ -253,7 +261,17 @@
253261
"outputs": [],
254262
"source": [
255263
"my_set = {1, 2, 3, 4}\n",
256-
"my_set.add(5)"
264+
"print(my_set)"
265+
]
266+
},
267+
{
268+
"cell_type": "code",
269+
"execution_count": null,
270+
"metadata": {},
271+
"outputs": [],
272+
"source": [
273+
"my_set.add(5)\n",
274+
"print(my_set)"
257275
]
258276
},
259277
{
@@ -436,11 +454,35 @@
436454
" \"set1\": {10, 20, 30},\n",
437455
" \"dict1\": {\"a\": 1, \"b\": 2, \"c\": 3},\n",
438456
"}\n",
439-
"print(dict_of_items)\n",
457+
"print(dict_of_items)"
458+
]
459+
},
460+
{
461+
"cell_type": "code",
462+
"execution_count": null,
463+
"metadata": {},
464+
"outputs": [],
465+
"source": [
440466
"dict_of_items.update({\"one\": 1, \"two\": 2})\n",
441-
"print(dict_of_items)\n",
442-
"print(dict_of_items.popitem())\n",
443-
"print(dict_of_items.pop(\"set1\"))"
467+
"print(dict_of_items)"
468+
]
469+
},
470+
{
471+
"cell_type": "code",
472+
"execution_count": null,
473+
"metadata": {},
474+
"outputs": [],
475+
"source": [
476+
"dict_of_items.popitem()"
477+
]
478+
},
479+
{
480+
"cell_type": "code",
481+
"execution_count": null,
482+
"metadata": {},
483+
"outputs": [],
484+
"source": [
485+
"dict_of_items.pop(\"set1\")"
444486
]
445487
},
446488
{

content/04_data_flow_control.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,10 +456,10 @@
456456
"cell_type": "markdown",
457457
"metadata": {},
458458
"source": [
459-
"1. Print the sum of first n numbers\n",
459+
"1. Print the sum of first `n` numbers\n",
460460
"2. Print the multiplication table of a number upto to 20\n",
461461
"3. Print all elements in the odd index position\n",
462-
"4. Create a dictionary to find the count of occurences of each element in [1, 3, 4, 5, 5, 2, 2, 3, 4, 10 , 8, 3]"
462+
"4. Create a dictionary to find the count of occurences of each element in `[1, 3, 4, 5, 5, 2, 2, 3, 4, 10 , 8, 3]`"
463463
]
464464
},
465465
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy