📊

Logic Building - Phase 4: Basic Arrays

Practice array operations, searching, counting, and transformation logic

50 questions•5 pages•~75 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 / 500%
Page 3 of 5 • Questions 21-30 of 50
Q21medium

What will be printed? arr = [1, 2, 3, 4, 5] result = arr[::2] print(result)

Q22easy

What is the result?

arr = [1, 2, 3]
arr.remove(2)
print(arr)
Q23easy

What will be printed? arr = [1, 2, 3, 4, 5] count = 0 for num in arr: if num > 3: count += 1 print(count)

Q24medium

What does this code do? arr = [5, 2, 8, 1, 9] second_max = sorted(arr)[-2] print(second_max)

Q25medium

What is the output?

arr = [1, 2, 3]
arr += [4, 5]
print(arr)
Q26hard

What will be printed? arr = [1, 2, 3, 4, 5] result = [x * x for x in arr if x % 2 == 1] print(result)

Q27medium

What is the result?

arr = [10, 20, 30, 40, 50]
print(arr[-3:])
Q28medium

What will be printed? arr = [1, 2, 3, 2, 4, 2] arr.remove(2) print(arr.count(2))

Q29easy

What does this code do? arr = [1, 2, 3, 4, 5] result = arr[::-1] print(result)

Q30medium

What is the output?

arr = [5, 2, 8, 1, 9]
arr.sort(reverse=True)
print(arr[1])

Quiz Pages

Navigate directly to paginated quiz sets. These links help you revise by page and make every page discoverable.