This repository was archived by the owner on Jan 9, 2023. It is now read-only.
Folders and files Name Name Last commit message
Last commit date
parent directory
View all files
Lesson 3 - Discovering you Paths
Comparison operators
Greater than >
Less than <
Equal to ==
Not equal to !=
Greater or equal to >=
Less or equal to <=
Special cases
1.1 + 2.2 != 3.3
(floating approximation values)
False < True
(0 < 1)
"10" != 2
(can compare objects of different type, no error)
"B" < "b"
(Capital < lowercase)
Compound statement
Multiple simple statements inside the statement
Indentation
4 spaces or 1 tab
Don't mix them
Multi-way selection
Takes some input , produces an output
To use a function, we need to know
Name
What it does
Arguments (inputs)
Return (output)
Importing modules
Ch8 Composition and Abstraction
Composition
Using a block of code inside another block
To achieve a larger goal
Abstraction
Giving block names
Allow for reusable and self-explanatory code
Ch9 Incremental Development
Testing
Always test while developing
pass
Do nothing
Use when the inside bits aren't implemented yet
NO true random
Reproduce experiment results
Making random numbers repeatable with the same seed
Always use a seed number in AI/ML projects
Ch10 Commenting
Readability
Helps to understand the code
Commenting out codes
Temporarily remove code without deleting it
Should be removed when complete
Multi-line comments aren't actually comments
''' is a string literal'''
Conventions
Useful / informative
Easy to understand
Docstrings
First line of comment is inline with starting """
Ending """
should be on a line on its own
You can’t perform that action at this time.