Welcome to part 2 of this session. Now that you have a working Python environment, you will begin to explore key python concepts, namely:
- Numbers and arithmetic operators
- Variable declaration and syntax
- Input and output
- Strings
- Booleans and None
- Flow control: if-else statements, for loops
For each theme there is a suggested textbook resource for you to read through. A very important directive is that you should reproduce the python statements and programs shown in the book as you go along. This will help you get used to running Python code and gain familiarity with the language and its syntax. Try not to just read through the text without writing any code.
Note that, in this part, you should use IPython to reproduce the python code presented to you in the book. To run Python interactively, open the environment with IPython or launch the QtConsole prompt on Anaconda's home tab.
- A Beginner Guide to Python 3 Programming by John Hunt - Chapters 1, 3-7
Theme | Book Chapter | Sections |
---|---|---|
What is Python? | 1 | All |
Your first python program | 3 | All |
Strings | 4 | All except 4.8 |
Numbers, booleans and None | 5 | Skip 5.5, 5.7.5 and 5.8 |
Flow control: if statements | 6 | All |
Flow control: for loops | 7 | 7.1 - 7.4, 7.7 |