July 25, 2021 - Day 2
Note: The following content is written by one of our students in their perspective of what they learnt.
Part Three
We started our 2nd Day with understanding the concept functions in programming and concluded that it is a set of instructions grouped and is all about substitutions. Next, we saw how to run a python file on terminal $ python3 filename.py
. We learned the difference how a variable is declared in Python and C and concluded that in Python, it can be directly assigned with the mentioning the datatype. Next, We understood about the order of execution which is very essential to became a master. We saw about name error (A name error is raised when we use the variable or function name which is not valid). Next, we understood everything in Python is an Object. Next we studied about OOPS and understood about members and methods with the example of a mic and an apple pencil. Next, we started to learn about collections. We started collections with lists and we studied how to declare a new list and some methods like adding items to the list, deleting items in the list. Next we saw about high order functions and type
function which returns the datatype/class of the variable. Also we studied a special property slicing in lists. We understood the difference between deep and shallow copy. Ending the forenoon session we saw about del
and in
keyword and ended with what +
does in lists.
Part Four
We started our afternoon class at 3:30. We continued collections with tuples
and some stuffs which is possible with tuples. Then we saw about CURD (Create, Update, Read, Delete) which is possible for mutable items and only Create and Read is possible in immutable items. Then we saw a important concept of packing and unpacking in tuples. Next, we continued with dictionaries and saw how to create a empty dictionary and dictionary with data and saw that key
in a dictionary must be of immutable and value can be of any type, also with the understanding of the concept of hashing. Following this we saw about in
and del
keywords and syntax for packing and unpacking items in dictionary. Atlast we saw about sets
and how to create a empty set and adding new item to a set.
Also we saw about the set operations
- Intersection
&
- Union
|
- Difference
-
- Symmetric Difference
^
- Superset
>=
- Subset
<=
We basically completed Variables and Collections. Other topics will be covered by next weekend.
Developer Documentation: https://devdocs.io/
Study material: https://www.w3schools.com/python/
Copy python: https://github.com/python/cpython/blob/3.9/Lib/copy.py
Notes
PS: Notes App on iPad was on dark mode while I was explaining, so the final output is in white background. We will switch to our regular GoodNotes App for next weekend.
To be continued… Next class on July 31, 2021