Learn
A Night at the Movies
Prompting: Redux!

Great! Let’s build out each part of the case, one step at a time. We’ll start with the “add” branch.

Instructions

1.

Inside your when "add" block, remove the puts "Added!" statement.

In its place, prompt the user for a movie title. Save the result in a new variable called title. (Your code already has an example of how to do this!)

Next, prompt the user for the rating of the movie. Save that in a new variable called rating.

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!)

Check the hint if you need help!

Folder Icon

Take this course for free

Already have an account?