WorksheetsPython-Expressions#1
Total questions: 10
Worksheet time: 7mins
Which of the following is a proper arithmetic expression in Python?
10 (15 + 6)
(10 * 2) (4 + 8)
5 * (6 - 2)
Which of the following are valid assignment statements in which only variable k has already assigned a value?
n = k + 1
n = n + 1
n + k = 10
n + 1 = 1
What does the following expression evaluates to ?
2 + 9 * ((3 * 12) - 8) / 10
27
27.2
28
30.8
Evaluate the following expression in Python
2 * 3 ** 2
18
36
12
Evaluate the following expression in Python?
24 // 4 // 4
1
2
24
1.5
Evaluate the following arithmetic expression in Python ?
2 ** 2 ** 3
256
48
64
512
Evaluate the following expression in Python?
2 + int(4.5)
6
6.5
7
Error
What is the exact result of the following expresssion in Python?
25 // 10.0
2.0
2
3
3.0
Evaluate the following expression in python?
-10 % 3 / 2
1
-1
0.5
-0.5
Which of the following are valid identifiers in Python?
a) errors b) error_count c) error-count
a
b
c
