A Night at the Movies (8.Display)


#1

hello guys.
i can not Pass this part.

it has an error:

Oops, try again. It looks like your 'puts' doesn't include deth: 1.

and also my sours code is:

movies = {
:deth => 1,
:lala => 2,
:ded => 3
}
puts "enter a word from this words"
print "(Add, Update, Display, Delete): "

choice = gets.chomp.downcase

case choice
when 'add'
# -------------------------
print "Enter your favorite movie:"; title = gets.chomp

print "how do you like it (from one to five): "; rating = gets.chomp
if movies[title.to_sym] == nil
    movies.merge!(title.to_sym => rating.to_i)
    puts "Your favorite movie has been updated!(your moveis: #{movies})"
else
    puts "the movie already exists!"
end 
# --------------------------

when 'update'
# --------------------------
puts "list of Movies #{movies}"
print "which one is your choise to change rate?"; title = gets.chomp
if movies[title.to_sym] == nil
puts "Error!"
else
print "new rate(from one to five): "; rating = gets.chomp
movies.merge!(title.to_sym => rating.to_i)
puts "Successfully rate Update! \n new list of movies#{movies}"
end
# --------------------------
when 'display'

movies.each{ |movie, rating| puts "#{movie}: #{rating}" }

when "delete"
puts 'Delete!'

else
puts "Error!"
end


#2

it is a ramble part . fool .
i prop it on my texteditor and i passed it . :frowning:
enter link description here