4. prompting: Redux!



oops, try again. It looks like you didnt add star wars to the hash!

 movies = {
    "deadpool" => 5,
puts "what you want? (add,update,display)"
choice = gets.chomp
case choice
when "add"
puts "what movie?"
title = gets.chomp
puts "what you rate this?"
rating = gets.chomp
movie[title] = rating
puts "added #{title}" 
when "update"
puts "updated"
when "display"
puts "movies!"
when "delete"
puts "deleted"
    puts "Error!"


1. Try to add second film to your movies hush.
2. Correct your line code:
puts "added #{title}"
by adding rating as well:
puts "#{title} / #{rating}"


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.