General CSE
Logical operators/Rounding
Comparison Operators
Debugging
100

What are the two ways to write a comment in python?

Either 

# for short comments 

or 

""" For Longer comments """

100

How many possible outcomes are there for a boolean value?

2 - either true or false

100

What is the logical operator if we want to check if something is equal to something else?

==
100

What is wrong with this code?

x = int(4+5)

print( "The number is " + (X)

X must be turned back into a string

200

What kind of variable is this?

x = "Hi there"

String

200

Given the variable X, how would I write to round the variable to the nearest two decimal places?

round (x, 2)

200

What does this python expression evaluate to?

100 != 100

False 

200

Why is this code getting an error statement?

x = 4

if x == 3

print("I am not 4)

The code is missing a colon

300

What does the following python program print?
x = "I am" 

y = 6 

z = "feet tall"
print(x) 

print(Z)

 print(Y)

I am

feet tall

6

300

What does this program print?

favorite_color = "blue"

if favorite_color != "blue":

if favorite_color != "red":

print ("must be yellow")

elif favorite_color == "blue":

print ("Must be blue")

Must be blue

300

Which of the following is not a comparison operator?

A. <= x

B. != X

C. > x

D. ?= X

D. ?= X

300

x = input ("what is your age?")

print( "You will be " + (x +1) + "years old next year")

x + 1 needs to be turned back into a string

400

How would you write code that prints "what a funny color" if the input for the question "what is a funny color?"  is brown

x = input ("What is a funny color?")

if x == "brown":

print("What a funny color")

400

Why will this code not print?

b = True

if True:

print("b is True!")

if b:

400

What will print for this comparison operator?

x = int(5 +7)

if x >= 16:

print("The answer is 16")

else:

print("The answer is not 16")

The answer is not 16

400

If someone prints the following statement, why is there an error statement? You must identify two errors

administrator = input("Are you an administrator?)

If adminestrator == "Yes"

print("You get keys!")

There is a quotation mark missing, a colon is missing and administrator is misspelled

M
e
n
u