When you run the code for num in range(1, 11): print(num), what does it print?
Given sum_numbers = 0 followed by for num in range(1, 11): sum_numbers += num and then print(sum_numbers), what value is printed?
Which loop correctly prints each element of the list my_list = [1, 2, 3] exactly once?
What value is printed by the code my_list = [2, 3, 4, 5]; product = 1; for num in my_list: product *= num; print(product)?
Which range call generates the even numbers from 2 to 10 (inclusive) when used as for n in ___: print(n)?
Which range call will iterate over the numbers 10, 9, 8, ..., 1 when used in a for loop?
Given s = 'Hello' and the loop for ch in s: print(ch), what sequence is printed?
What value is printed by the code my_list = [3, 9, 1, 6, 2, 8]; largest = my_list[0]; for num in my_list: if num u003E largest: largest = num; print(largest)?
Given my_list = [4, 7, 9, 2, 5], what value is printed by total = 0; for num in my_list: total += num; average = total / len(my_list); print(average)?
For s = 'Hello World', what does the loop for ch in s: if ch.isupper(): print(ch) print?
What number is printed by the code s = 'Hello World'; vowels = 'AEIOUaeiou'; count = 0; for ch in s: if ch in vowels: count += 1; print(count)?
How many total stars are printed by the code for i in range(5): for j in range(i + 1): print('*', end=''); print()?
What value is printed by the code num = 5; factorial = 1; while num u003E 0: factorial *= num; num -= 1; print(factorial)?
What value is printed by the code my_list = [3, 8, 2, 7, 4]; target = 7; index = 0; while index u003C len(my_list): if my_list[index] == target: break; index += 1; print(index)?
In a loop that searches for a value, what does the break statement do when the value is found?