Assignment instructions

Assignment instructions

Complete the questions to the best of your ability

Questions for this assignment

What will the following code print?

x = 0

if x = 0:

print("x is equal to zero.")

elif x >= 0:

print("x is greater than zero.")

else:

print("x is less than zero.")

What will be printed?

x = 5

if x <= 2:

print("This is 2")

if x <= 4:

print("This is 4")

if x <= 6:

print("This is 6")

if x <= 8:

print("This is 8")

What will be printed?

x = 5

if x <= 2:

print("This is 2")

elif x <= 4:

print("This is 4")

elif x <= 6:

print("This is 6")

elif x <= 8:

print("This is 8")

What is the boolean value of this statement?

(2 <= 2 * 3 / 6) and (7 + 1 == 8)

What is the boolean value of this statement?

(12 > 6 * 3) or ( 7 >= -3 + 4)

What is the boolean value of this statement?

not True or False and (not True or not (False and True))