2025 May OPPE 1 -Set 4¶
Section 1 · Question 1
Double First and Last Elements
Prepend and append the first and last elements of a list. Covers list concatenation and slicing.
SolvedSection 1 · Question 2
Extract Email Username
Return everything before the @ in an email string. Covers split(), partition(), and index().
Section 1 · Question 3
Four Digit Shuffle
Rearrange digits of a 4-digit number in order 2-4-1-3. Covers string indexing and digit arithmetic.
SolvedSection 2 · Question 1
Uppercase Even Index Words
Uppercase words at even indices in a sentence. Covers enumerate(), step slicing, and list comprehensions.
Section 2 · Question 2
Print Pieces from Chess Notation
Parse chess moves and print the piece names. Full I/O problem covering dict lookup, castling handling, and filter/map.
SolvedSection 3 · Question 1
YouTube Video Engagement Analysis
Five functions on video engagement data -rates, thresholds, averages. Covers max(key=), filter/map, and function reuse.
Section 3 · Question 2
Format Tic-Tac-Toe Board
Print an m×n board with +, -, | borders. Full I/O problem covering string multiplication and "|".join().