What is wrong? It gives an error message "Oops, try again. It looks like you didn't add dasd to the movies hash!", but it did I checked


#1

movies={
Harry_poter: 5,
Game_Of_Trones: 5,
Vampire: 3,
}
puts "Choice whot would you wont to do. \n Type 'add' if you whant add a movie \n Type 'update' to update a movie \n Type 'display' to display all movies \n Type 'delite' to delite a movie"
choise=gets.chomp
case choise
when "add"
puts "Whot movie do you wont add?"
title=gets.chomp
puts "Add rating to thes movie (0-5)"
rating=gets.chomp
movies[title.to_sym]=rating.to_i
puts "#{title} hav been added. A rating is #{rating}"
# movies.each {|k,v| puts "#{k} - #{v}"}
when "update"
puts "Apdated!"
when "distlay"
puts "Movies!"
when "delite"
puts "Delited!"
else
puts "Error!"
end


#2

Which exercise is it?


#3

It is "The Refactor Factory", bat all is well. I should't have call "to_i" and "to_sym". It had to be done in the next lesson) Thank.