IT 116: Introduction to Scripting
Class 8 Ungraded Quiz
-
Write a Python statement that evaluates to
True
if the variable
whose name is num has a value greater than 0 and less than 10.
-
Write a Python statement that evaluates to
True
if the variable
whose name is num has a value greater than or equal to 0 and
less than or equal to 10.
-
What is the data type of the variable whose name is value_good
that is created by the following statement?
value_good = num > 0
-
What is the boolean value of the following expression?
5 and 0
-
What is the boolean value of the following expression?
"a" or ""
-
What is the boolean value of the following expression?
not 5
-
If you typed the following in Python's interactive mode,
what would the result be?
not False
-
If you typed the following in Python's interactive mode,
what would the result be?
True and False
-
If you typed the following in Python's interactive mode,
what would the result be?
True or False
-
If you typed the following in Python's interactive mode,
what would the result be?
not True