Challenge 3: Hash Iteration and Filtering — Solution scores = { philip: 82, alex: 55, jordan: 91, sam: 47 } scores.each do |student, score| status = score >= 60 ? "pass" : "fail" puts "#{student}: #{status}" end passing = scores.select { |student, score| score >= 60 } puts passing.inspect =begin Output: philip: pass alex: fail jordan: pass sam: fail {philip: 82, jordan: 91} Notes: - scores.each do |student, score| destructures each key-value pair directly in the block parameters — student gets the symbol key, score gets the integer value, in that order. - The ternary (score >= 60 ? "pass" : "fail") is used here instead of a full if/else since it's a short, single-expression choice — the kind of case a ternary suits well even though Ruby's if/else is itself an expression too. - scores.select on a Hash keeps the Hash shape in its result (not an Array of pairs), which is why passing.inspect prints back out as {philip: 82, jordan: 91} rather than a list of [key, value] arrays. =end