2026 Jan OPPE 1 - Set 4¶
Classify Temperature
Parse a temperature string with unit C or K and classify as Cold, Moderate, or Hot. Covers unit stripping, Kelvin conversion, and boundary conditions.
SolvedCase Insensitive Strict Prefix
Check if one string is a strict prefix of the other, case-insensitively. Covers lower(), startswith(), and the "strict" (not equal) condition.
Describe Number (FizzBuzz)
Same as 2025 May Set 1 - S1Q1. Covers divisibility checks and the importance of checking the combined case first.
SolvedSales Analysis by Product
Aggregate sales per product and filter by threshold. Covers list comprehensions, empty-list guard, and walrus operator filtering.
SolvedFirst Top Performer by Average
Find the student with the highest average score, ties broken by first appearance. Full I/O - covers order-tracking with a list and max(order, key=avg).
URL Link Analytics
Four functions on URL strings - secure count, most common domain, unique paths, longest URL. Covers URL parsing with split("//")[1].split("/")[0] and first-occurrence tie-breaking.
Fill Numbered Brackets
Replace [] with sequential numbers across multiple lines. Full I/O - covers str.replace(old, new, 1), global counters, and re.sub with a callable.