Lecture 2: Introduction to programming ====================================== Based on the lecture and the readings (R&S Programming Basics) you should be able to: - Identify how variable values are set in a python program - Distinguish between numbers, strings, and booleans - Describe ``None`` - Understand how arithmetic works on both numbers and strings Below, please find some practice problems for this topic. These problems should be completed by hand, that is, without the use of a computer. (Note: you can check your answer using ``ipython3``.) 1. Determine the value of ``b`` at the end of this code fragment: .. code-block:: python a = 11 a = a/2 + a%2 + a//2 b = a 2. Determine the value of ``e`` at the end of this code fragment: .. code-block:: python c = True d = False c = c or d e = c and d f = not e 3. Determine the value of ``i`` at the end of this code fragment: .. code-block:: python f = 'abcde' g = 7.0 h = str(g) i = h + f i = i + f