Basics: IB Computer Science practice
Variables, data types, operators, input and output. 14 questions in the style of the IB Computer Science exam.
Sample questions
Which data type is the best choice for storing the value 3.75?
- Integer
- Float (real)
- String
- Boolean
What does this program print?
x = "7" y = 3 print(x * y) print(int(x) * y)
What is printed by `print(7 / 2)` in Python 3?
- 3
- 3.5
- 4
- 3.0