QMB3302 EXAM 1 | QUESTIONS AND ANSWERS | 2026 UPDATE | WITH COMPLETE
SOLUTION
Match following operators with their respective definition: (Greater than or equal to, less than, not
equal to, greater than, equal to, less than or equal to) - (ANSWER)greater than or equal to ( >= )
less than ( < )
not equal to ( != )
greater than ( > )
equal to ( == )
less than or equal to ( <= )
True or false: all operators produce an "int" output. - (ANSWER)False
Remember... there are no points for second place
place = 2
if (select)
(select)
2:
points
=0
print(points) - (ANSWER)place
==
points
, QMB3302 EXAM 1 | QUESTIONS AND ANSWERS | 2026 UPDATE | WITH COMPLETE
SOLUTION
Assuming this is a complete code chunk, and we expect to see output printed after running this, why is
the below code incorrect?
if tom_brady == the_goat:
print("The Bucs just won another Super Bowl") - (ANSWER)the variables are not defined
Steve jobs. what does his code below output?
quota = 10
newton = 50
print("Welcome to Mac")
if newton < quota:
print ("Apple did not meet its quota of", quota, "Newtons")
Print ("Thhank youo for using Mac") - (ANSWER)Welcome to mac
Apple did not meet its quota of 10 Newtons
Thank you for using Mac
When nesting if statements, how many spaces do you need to ensure proper indentation? Please type in
the number of spaces you need below. - (ANSWER)4
what type of error will you receive if you forget to indent your nested "if" statement? -
(ANSWER)IndentationError
What is the output of the following code?
y= -0
if y >= 0:
SOLUTION
Match following operators with their respective definition: (Greater than or equal to, less than, not
equal to, greater than, equal to, less than or equal to) - (ANSWER)greater than or equal to ( >= )
less than ( < )
not equal to ( != )
greater than ( > )
equal to ( == )
less than or equal to ( <= )
True or false: all operators produce an "int" output. - (ANSWER)False
Remember... there are no points for second place
place = 2
if (select)
(select)
2:
points
=0
print(points) - (ANSWER)place
==
points
, QMB3302 EXAM 1 | QUESTIONS AND ANSWERS | 2026 UPDATE | WITH COMPLETE
SOLUTION
Assuming this is a complete code chunk, and we expect to see output printed after running this, why is
the below code incorrect?
if tom_brady == the_goat:
print("The Bucs just won another Super Bowl") - (ANSWER)the variables are not defined
Steve jobs. what does his code below output?
quota = 10
newton = 50
print("Welcome to Mac")
if newton < quota:
print ("Apple did not meet its quota of", quota, "Newtons")
Print ("Thhank youo for using Mac") - (ANSWER)Welcome to mac
Apple did not meet its quota of 10 Newtons
Thank you for using Mac
When nesting if statements, how many spaces do you need to ensure proper indentation? Please type in
the number of spaces you need below. - (ANSWER)4
what type of error will you receive if you forget to indent your nested "if" statement? -
(ANSWER)IndentationError
What is the output of the following code?
y= -0
if y >= 0: