🔄
Logic Building - Phase 2: Looping & Patterns
Master loops, iteration, and pattern recognition with for and while loops
45 questions•5 pages•~68 min
Use this quiz track to strengthen recall, speed, and exam-style decision making. Attempt one page first, review explanations, and then re-attempt incorrect questions without notes.
A good scoring strategy is to mark uncertain questions, finish known ones quickly, and return with elimination logic. This improves accuracy while keeping momentum under time constraints.
Progress: 0 / 450%
Page 5 of 5 • Questions 41-45 of 45
Q41medium
What will be printed? count = 0 for i in range(1, 100): if i % 3 == 0 and i % 5 == 0: count += 1 print(count)
Q42hard
What is the result?
num = 121
original = num
reversed = 0
while num > 0:
reversed = reversed * 10 + num % 10
num //= 10
print(reversed == original)Q43easy
What will be printed? for i in range(10, 0, -1): if i % 2 == 0: print(i, end=" ")
Q44hard
What does this code do? n = 20 primes = [] for num in range(2, n+1): is_prime = True for i in range(2, int(num**0.5)+1): if num % i == 0: is_prime = False break if is_prime: primes.append(num)
Q45medium
What is the output?
for i in range(1, 6):
for j in range(1, i+1):
print("*", end="")
print()...