1. How You Will Learn
- Build Real and Functional Applications: Learn by Doing and Observing
- Learn by Doing: Paired-coding – We Will Code Together
- Learn by Observing: Watch Us Code
2. Do your Homework to Accelerate Coding Intuition
The reading assignments and, more importantly, the problem sets from Google are key to developing coding intuition! The purpose of the in-class sessions are to teach you how to structure and build apps quickly!
def function_name (parameter_1, parameter_2 = 4): variable_1 = 5 result = (parameter_1 + parameter_2) * variable_1 return result argument_1 = 2 argument_2 = 3 print ( function_name(argument_1, argument_2) )
3. Python 101
Python Has formatting and style conventions. Please abide. Also, it will be advantageous to familiarize yourself with differences between Python 3+ and 2.7.
Here some Python “101s”:
- Modules are python source code saved as a *.py file
- Packages are groups of modules in a directory containing an __init__.py file
- Class names use the
CapWordsconvention (first letter always caps). This is also known as
PascalCase. (cf., PEP-0008)
- Modules and packages should have short, all-lowercase names. Underscores may be used in the module name if it improves readability (e.g.,
lowercase_underscore) . NOTE: Underscores are discouraged for package names
- Function and variable names should be descriptive and lowercase, with words separated by underscores as necessary to improve readability (e.g.,
- Constants use
- Unlike PHP, spacing between parentheses is not a convention in Python
- Indentation has syntactical meaning within Python. Follow the rules (PEP-0008: Code Layout)
- Three types of commenting conventions: Docstring, Block, and Inline. Review Lilian Lemmer’s Memories app for documentation best practices. This post on guidelines may also be useful.