1) What type of loop is best when you know how many times to repeat? a) while loop b) for loop c) if statement d) do-while loop 2) Which keyword is used to stop a while loop early? a) exit b) stop c) break d) continue 3) True or False: A for loop is useful when repeating until a condition is met. a) TRUE b) FALSE c) Sometimes d) Never 4) Which loop allows iteration over a sequence? a) if statement b) while loop c) for loop d) switch case 5) What is the default step value in a Python for loop? a) 2 b) 0 c) 1 d) None

Leaderboard

Visual style

Options

Switch template

Continue editing: ?