Predict the Output
Fun Facts
Find the Truth
Ones I couldn't fit into a category
Other Ones I couldn't fit into a category
100

x = "Hello "

y = "World"

print(x + y)

What would be printed?

"Hello World"
100

What, when inputed into bool(), would result in false? (be specific)

Numerical 0 (0 or 0.0, not '0' or "0.0")

100

Which of the following is NOT true?

It is necessary to use "else" whenever "if" is used in a program

All statements in a block have the same indent

An indented block should be started after the : symbol

All statements are true.


It is necessary to use "else" whenever "if" is used in a program

100

What is a python function?

A piece of code that only runs when called

100

What is the order of operations of the boolean statements?

NOT, AND, OR

200

income = 1000

if income > 2000:

    tax = 500

else:

    tax = 0

print(tax)

0

200

What is the order of conditional statements?

If- Elif- Else

200

Which of the following is true?

9%2 = 4

9 // 2 = 4 

9/2 = 4

None of the above.


9 // 2 = 4

200

Which of the following ways are valid ways of dividing the variable x by 2?

x/2

x = x/2

x_new = x/2

x/=2


All but x/2

200

How would you fix the code below?

print('I'm very excited about my exam!')

backslash (escape character) before the '

print('I\'m very excited about my exam!')

300

for char in "Hello":

    print(char, end = ",")

H,e,l,l,o

300

Where does python start counting from?

0

300

Which ones are true?


The variable names cannot start with a digit.

Variable names are case-sensitive.

Variables cannot start with an underscore 

Variable names can be reserved keywords.


The variable names cannot start with a digit.

Variable names are case-sensitive.

300

The list.pop() function will

Remove the last element from a list

300

What would the output of the following code be?

second_list_loop = -1

for i in range(5):

    second_list = [1,2,3,4,5]

    print(i, second_list[second_list_loop])

    second_list_loop -=1

0, 5

1, 4

2, 3

3, 2

4, 1

400

lst = [1, 2, 3, 4, 5]

del lst[:]

print(lst)

[]

400

How is the structure of a conditional statement similar to the structure of a recursive statement and a function definition?

<keyword> ___ :

    <stuff having to do with the thing>

400

Which is true?


List object can contain a tuple as one of the items

Tuple can contain a list as one of the items

Both are true

Both are false


Both are true

400

Differentiate between a break and continue statement

A break statement terminates the loop it is in, the continue statement skips the current iteration and starts the next one.

400

What would this output?


my_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

print(my_list[-3:-1])

del my_list[7:9]

print(my_list[-3:-1])

del my_list[::]

print(my_list)

[8,9]

[6,7]

[]

500

from math import sin

print(sin(1))

0.8414709848078965

500
Name a python object that is not iterable. 

A number

500

If lst = [[1,2] , [3,4]] , which of the following result true?

3 in lst

[3,4] not in lst

3 in lst[1]

None of the above


3 in lst[1]

500

Which of the following would Python actually run?


if age >= 18

if age = 18

if age >=18:



if age >=18:

500

Are the two pieces of code below equivalent?

i = 0

while i<5:

    print("The iteration is", i)

    i +=1

AND

for i in range(5):

    print("The iteration is", i)


Yes!