Help on 4 prompting


#1

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!"
else
    puts "Error!"

end


#2

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


#3

witch one is this in ruby


#4

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


#5

Did you remove the second gets.chomp?