Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

Commit 661df1c

Browse files
committed
Use Obsidian markdown
1 parent f319da6 commit 661df1c

314 files changed

Lines changed: 7883 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎0._Logistics.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# 0. Logistics
2+
Created Monday 15 March 2021
3+
4+

‎0._Logistics/1._Resources.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# 1. Resources
2+
Created Monday 15 March 2021
3+
4+
Courses:
5+
6+
* Python for Everybody - <https://www.coursera.org/learn/python/home/welcome>
7+
8+
9+
Books:
10+
11+
* <https://automatetheboringstuff.com/> - Al Sweigart. Hands on Python learning
12+
13+
14+
Websites:
15+
16+
* python.org - official documentation
17+
* <https://tutorialedge.net/course/python/>
18+
19+

‎1._Intro.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# 1. Intro
2+
Created Monday 15 March 2021
3+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# 1. Python - WH questions
2+
Created Monday 15 March 2021
3+
4+
FIXME: add from Wikipedia Page
5+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# 2. Python - language details
2+
Created Monday 15 March 2021
3+
4+
Skim the [Wikipedia page.](https://en.wikipedia.org/wiki/Python_(programming_language))
5+

‎1._Intro/3._Setup.md‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# 3. Setup
2+
Created Monday 15 March 2021
3+
4+
#### Python Installation
5+
**For Windows**
6+
7+
* Download and install executable from [www.python.org](www.python.org)
8+
* While installing, check the "Add to environment PATH" option.
9+
10+
11+
**For Linux and Mac**
12+
Warning: Don't install/update the system(built-in) Python. It can mess up your system.
13+
14+
* Install pyenv.
15+
* Then install latest version of Python3.
16+
* All steps: <https://youtu.be/fv8YxO3AJqg>
17+
18+
19+
#### Code Editor(I prefer VS Code)
20+
21+
* Install the official executable for Visual Studio Code.
22+
* Install these extensions:
23+
* Python - by Microsoft
24+
* Pylance - by Microsoft
25+
* Visual Studio Intellicode - by Microsoft
26+
* Code Runner - by Jun Han
27+
* Go to Settings → Extensions → Code Runner and enable "Run in Integrated terminal".
28+
29+
30+
#### Running Python code
31+
There are two ways to run python code:
32+
33+
1. REPL - open terminal, write ``python3``, press Enter. You can now run Python. Good for experimenting.
34+
2. Run code from file(s), for more "persistent" work.
35+
36+

‎2._Learning_Python.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# 2. Learning Python
2+
Created Monday 15 March 2021
3+
4+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# A. Basic - no OOP
2+
Created Tuesday 20 October 2020
3+
4+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# 1. Basic constructs
2+
Created Friday 15 May 2020
3+
4+
5+
1. ``type``(variable) returns the type of the variable.
6+
2. C++ and Python3 follow the same variable naming rules.
7+
3. string_name.replace(catch, rep) replaces all occurrences of catch with rep in the string.
8+
4. If place-holders are sequential, we can write them as {}, no need of indices.
9+
5. listObj.insert(pos, value) inserts the value in the list, there's nothing like push().
10+
6. Short hand if
11+
12+
if 2 > 1: print("a is greater than b") # if single line
13+
14+
15+
7. ternary operator - follows English
16+
17+
print("A") if 2 > 1 else print("B")
18+
# notice the order, work1 condition else work2 - like english
19+
20+
21+
8. use pass for empty if statements - they just syntactical, and have no effect whatsover on execution.
22+
9. chr(65) gets us the character for ASCII code and ord('A') gets us the ascii ordinate for a character(passed as string)
23+
10. Falsy values - There are 10
24+
25+
![](./1._Basic_constructs/pasted_image.png)
26+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# 1. Variables
2+
Created Saturday 17 October 2020
3+
4+
#### Basic
5+
6+
* Variables are an easy way to refer to memory locations and store data.
7+
* Everything is an object in Python.
8+
* Python is dynamically typed(no need to specify type anywhere). Declarations and initalizations are done at the same time.
9+
* Has an automatic garbage-collector(no manual memory management required).
10+
11+
12+
#### Variable Naming rules
13+
Same as C++
14+
15+
* Symbols allowed - lowercase and uppercase english alphabets, digits(0-9) and the underscore(_).
16+
* Names cannot start with a digit
17+
18+
19+
#### Types of variables
20+
There are 3 kinds of variables:
21+
22+
1. Global variables
23+
2. Function variables
24+
3. Class variables
25+
26+

0 commit comments

Comments
 (0)