Lesson 1.3 Case Statement will not pass


#1

I get getting the error message: Oops, try again. It looks like your case statement doesn't puts 'Added!' when choice == 'add'. I don't understand why it is giving me this error as I have tried replacing the "" for '' on both either values in both "when" and "puts" statements. The code complies fine and I get the output for what ever word i type in, but it will not pass and I keep getting this same error on each word I use.

Here is my code:

movies = {Rocky: 1, Gladiator: 2, Averngers: 3}

puts "What would you like to do with your movie listing?"

choice = gets.chomp

case choice
when "add"
puts "added!"
when "update"
puts "updated!"
when "display"
puts "displayed!"
when "delete"
puts "deleted!"
else
puts "error!"
end

Here is my output:

What would you like to do with your movie listing?
add
added!
nil


#2

Probably the majuscule on "Added!" missing.


#3

Can you speak in lehman's terms as I don't understand what is "majuscule". Also my code doe have the following in it:

when 'add'
puts "Added!"

I am confused what your trying to tell me. Also, how I get this to pass?


#4

The code you posted above has the following:

puts "added!"

And the instructions are asking for "Added!" with a majuscule "A".

A majuscule is a capitale letter (A, B, C...) as opposed to minuscules (a, b, c...)


#5

Thank you clearing that up for me as I have added your suggestion and I got it to pass~!!! Thanks so much!


#6

In English, you say uppercase and lowercase. Or, "the first letter is capitalized".