2025 May OPPE 1 - Set 1¶
Describe Number Based on Divisibility
FizzBuzz variant returning "Fizz", "Buzz", "FizzBuzz", or "Normal". Covers modulo arithmetic and the importance of checking compound conditions first.
SolvedCard to Value Tuple
Convert a playing card string like '10D' into a (suit_value, rank_value) tuple. Covers negative indexing and dict.get with fallback.
Rotate Even Indices
Right-rotate the elements at even positions of a list by k steps, leaving odd-indexed elements untouched. Covers l[::2] slice assignment.
Unique Sum Pairs
Return a set of sorted tuples where each pair sums to k. Covers Counter, same-value pair handling, and deduplication via sorted tuples.
Replace Consonants with Hash
Read a multi-line passage and replace all consonants with #. Full I/O problem covering isalpha(), vowel checking, and ''.join().
Text Frequency Analysis
Four-task text analyser: non-whitespace count, most frequent character, diverse word count, and highest character frequency word. Covers Counter and inner functions.
SolvedDraw Arrow Trail
Print right/left arrows aligned by a cumulative position tracker. Full I/O pattern printing using string multiplication and position arithmetic.
Solved