Partial answer for 11.rb that probably has a glaring logic error.