This week’s topics
Variables, data types and constants
- Integers, floats, strings and Booleans
- Naming variables
- Constants
What you will be able to do
- 2.1 Use variables, data types and constants.
Activity
Write a program that stores and prints details about yourself.
Study materials
Further resources
- Introduction to Python Programming, 1.3–1.5: Variables, strings, numbers · PDF · OpenStax Introduction to Python Programming (2024), 1.3–1.5: variables, strings, integers and floats, pp. 14–22 · for registered students
- Think Python, ch. 2: Variables, expressions and statements · PDF · Downey, Think Python 2e (Green Tea Press), ch. 2: assignment and naming variables, pp. 9–16 · for registered students
- Python Notes for Professionals, ch. 2: Python Data Types · PDF · GoalKicker Python Notes for Professionals, ch. 2: int, float, str and bool at a glance, pp. 33–34 · for registered students
- Analysis of student misconceptions using Python as an introductory programming language · Open-access article · Johnson et al. (2020), Computing Education Practice (CEP '20), ACM. Python misconceptions about variables, data types and operators. · for registered students
Materials marked “for registered students” open in the student portal, which is set up as soon as you receive final acceptance.