No student devices needed. Know more
7 questions
1.How many possible values are there for a boolean variable?
0
1
2
3
2.Which of the following is not a comparison operator?
<=
?
!=
>
3.What does this Python expression evaluate to?
1000 != 1000
"False"
"True"
False
True
4.Which of the following is not a logical operator in Python?
or
and
not
because
5.What will print to the screen when the following program is run?
number = 20
greater_than_zero = number >10
print(type(number))
<class ‘bool’>
<class ‘int’>
20
10
6.What will be the output of this program?
number = 10
greater_than_zero = number > 5
if greater_than_zero:
print(number)
10
5
Nothing will print
True
7.What will be the output of this program?
number = 10
less_than_zero = number < 0
if less_than_zero:
print(number)
number = number-2
less_than_zero = number > 0
if less_than_zero:
print(number)
8
10
8
10
10
8
Explore all questions with a free account