4.Entry


#1

Hi, I have an issue with this exercise. It puts me all the time that I did not add movies to the Hash . Anyone know how to correct this thing?
thank you

films = {
Memeto: 4,
Batman: 9,
Jurrasik: 1,
Terminator: 4

}

puts "Quel est le meilleur film?"

choix=gets.chomp

case choice
when'ajouter'
puts "Saisissez le titre du film"
titre = gets.chomp
if titre
puts "quelle note donnez vous?"
note = gets.chomp
films[titre] = note
puts "vous avez ajouté une note de #{note} pour le film #{titre}"

end
when "update"
puts "Updated!"
when "display"
puts "Movies!"
puts movies
when "delete"
puts "Deleted!"
else
puts "Error!"
end


#2

This one drove me mad too. I don't think we should have to write it this way...but it got me through the exercise:

change your line: films[titre] = note
to: puts films[titre] = note