-- Homework 16, problem 2 -- solution.

local level = 12
local has_key = true

if level >= 10 and has_key then
    print("You can enter the dungeon.")
elseif level < 10 and not has_key then
    print("Level too low and missing the key.")
elseif level < 10 then
    print("Level too low.")
else
    print("Missing the key.")
end
