(Blank)
(Blank)
(Blank)
(Blank)
(Blank)
100

What Are The 4 Parts of a While Loop?

Identify Loop Var, Initialize Loop Var, Condition While Loop, Update Loop Var 

100

print(10 / 0) 

Is an example of?

Traceback error

(cannot divide by zero)

100

if x > 5
  print("x is greater than 5")

is an example of...

Syntax Error

100

What should be implemented in any code to perform iteration?

A loop

100

T or F:

A while loop will continue to iterate forever unless it meets a condition to stop.

True

200

This keyword is used to define a function.

def

200

This type can return True or False statements...

bool

200

The keyword used to check that a condition has been deemed True

if

200

What built in function is used to add an item to the end of a list?

append()

200
Returns the number of elements in a list.

Len() or Length

300

How would you convert a string to all be uppercase?

.upper()

300

What is wrong with this code

s = 'Phantom Opera'

index = len(s)-1

while index >= 0

    print(chr(ord(s[index])+1),end='')

    index -= 1

while index >= 0:

300

How can your program exit a loop before it finishes iterating?

Break

300

How can you get an input from a user in a python program?

input()

300

Is this variable correct?

2DiskMove = print("Hello world!")

No!

500

What function must be used to take the string 'venture' out of the variable jake_dog.

jake_dog = 'adventure' 

jake_dog[2:]

500

pro = 15

app = 0

tut = 4

while not (pro < tut):

    pro = pro - tut

    app = app + 2

What is the final value for pro and app and tut. Also, what is the final value for (pro < tut) True or False.

pro = 3

app = 6

tut = 4

(pro < tut) = True 

M
e
n
u