Exercise 1: categorize(score:) with a Range-Based switch — Possible Solution =================================================================================== func categorize(score: Int) { switch score { case 0..<50: print("Fail") case 50..<70: print("Pass") case 70...: print("Distinction") default: print("Invalid score") } } categorize(score: 25) // Prints: Fail categorize(score: 60) // Prints: Pass categorize(score: 85) // Prints: Distinction HOW IT WORKS: 0..<50 is a real half-open range (0 up to but not including 50), 50..<70 covers 50 up to but not including 70, and 70... is a real one-sided range covering 70 and everything above it with no upper bound. Because Swift's switch requires every possible real input to be covered (exhaustiveness), a default case is included to handle any value outside 0...Int.max (e.g. a genuinely invalid negative score), even though none of the three test calls actually reach it. ANSWER: The switch statement above correctly prints "Fail" for 25, "Pass" for 60, and "Distinction" for 85, using Swift's real half-open (..<) and one-sided (...) range operators to divide the score into three non-overlapping bands, with a default case satisfying Swift's exhaustiveness requirement. WHY THIS WORKS AS AN ANSWER ------------------------------ This correctly uses Swift's real range-matching switch cases to implement three non-overlapping, exhaustive bands, verified against one representative test value from each real category.