8. To begin you will need...
○ Python 3+ installed
https://wiki.python.org/moin/BeginnersGuide/Download
Windows: https://www.python.org/downloads/windows/
Mac: https://www.python.org/downloads/mac-osx/
○ A text editor to write python programs
Recommended: https://atom.io/
○ Terminal to run Python
9. Python 2 vs Python 3
https://wiki.python.org/moin/Python2orPython3
15. Rules for variables in Python
○ Must start with a letter or the underscore character
○ Cannot start with a number
○ Can only contain alpha-numeric characters and
underscores (a-z, 0-9, and _ )
○ Are case-sensitive (age, Age and AGE are three
different variables)
17. X = input('Hi there! What is your name?n')
if len(X) < 1: X="friend"
def greetname(name):
print('Lovely to meet you',name,', welcome to Intro
to Python!')
greetname(X)
21. File handling (function)
○ Open()function
■ takes 2 parameters: filename and mode
■ Modes: read (r), append (a), write (w),
create (x)|binary (b) or text (t)
22. For loop (iteration)
○ Use for iterating over a sequence
■ list, tuple, dictionary, set or string
■ use break and continue to interrupt the
loop
23. If..else loop (conditional execution)
○ Python relies on indentation to define scope
○ Use If statement and loop to express logical
conditions like a == b, a!= b, a < b etc.
○ else and elif express alternate conditions
○ and / or to combine conditions
26. PIP package manager
○ PIP included by default in Python 3+
■ Package = all files you need for a module
■ Module = Python code libraries you can include in your project
○ Downloading a package
■ $ pip install <package>
○ Using a package
■ import <package>