Welcome to our Mastering Computer Programming training!
Let us start by answering the following questions:
- What is a computer?
- What is computer science (also known as Informatique in countries such as France or Germany)?
- What is a program?
- What is a programming language?
- Why Python?
The next step is to work through a series of exercises which will increase our understanding of computer programming using Python. For that, we will use the book How to Think Like a Computer Scientist / Learning with Python written by Jeffrey Elkner, Allen B. Downey, and Chris Meyers and which can be read online.
Try to find solutions to the exercises found at the end of Chapter 1 in the book, The Way of the Program. Pay special attention to the difference between evaluating an expression (e.g. ‘This is a test…’) as opposed to printing the evaluation of an expression (e.g. print ‘This is a test…’)
Variables, expressions and statements
Now, let’s tackle Chapter 2 of the book: Variables, expressions and statements. In Python, values are typed (i.e. integer, string, float, …) and, consequently, variables which contain values are also typed.
Let’s work out the exercises at the end of this Chapter. Pay special attention to the fact that an assignment has no value and, consequently, cannot be used in an expression. Furthermore, it is important to understand the difference between input() and raw_input().
Leave a Reply