This week’s topics
Input, output and calculations
- Asking the user for input
- Converting data types
- Simple calculations
What you will be able to do
- 3.2 Handle user input and output effectively.
- 2.1 Use variables, data types and constants.
Activity
Write a program that converts euros to another currency.
Study materials
Further resources
- Introduction to Python Programming, 1.2: Input/output · PDF · OpenStax Introduction to Python Programming (2024), 1.2: asking the user for input and printing output, pp. 10–13 · for registered students
- Introduction to Python Programming, 2.2–2.4: Type conversion · PDF · OpenStax Introduction to Python Programming (2024), 2.2–2.4: converting data types and mixing numbers, pp. 40–48 · for registered students
- Python Notes for Professionals, ch. 9: Simple Mathematical Operators · PDF · GoalKicker Python Notes for Professionals, ch. 9: +, -, *, /, // and % in Python, pp. 57–64 · for registered students
- 37 million compilations: investigating novice programming mistakes on large-scale student… · Open-access article · Altadmri & Brown (2015), SIGCSE '15, ACM. The most common beginner errors, including type mismatches, from 37 million compilations. · for registered students
Materials marked “for registered students” open in the student portal, which is set up as soon as you receive final acceptance.