"Q".to_i = 0 -> Like the way you have included this into your case statement;