Help on 4 prompting


movies = {
'vegetable' => 'brocolli'
puts "your film?"
choice= gets.chomp
puts "type add to add a movie"
puts "type update to update a movie"
puts "type display to display movies"
puts "type delete to delete a movie"
puts "your choice: "; choice = gets.chomp

case choice
when 'add'

    prompt "Write the title of the movie"
    title = gets.chomp
    prompt "how would you rate it ?"

rating = gets.chomp
movies[title] = rating
puts "Added #{title} with a rating of #{rating}"

when 'update'
    puts "Updated!"
when 'display'
    puts "Movies!"
when 'delete'
    puts "Deleted!"
    puts "Error!"



You don't need to ask twice for input. Try removing one of these.


witch one is this in ruby


Add that movie/rating pair to the movies hash and puts a message indicating the pair was added. (No need for to_sym or to_i just yet!) this is my problem


Did you remove the second gets.chomp?