5/10 A night at the movies "Learn Ruby"

Hi everyone,

I’m kind of worried on my code for the exercise 5 in the “A night at the movies” part of learn Ruby.
I passed it because I guess my code is working but I was asking my self :

How do i add a pause in a when section of my case ?

Here is my code :

:movies = {
Ups: 3,
Up!: 2,
Shrek: 5,

puts “What do you want to do?”

choice = gets.chomp

case choice

when “add”

puts “What movie do you want to add?”
title = gets.chomp

puts “What rating is #{title}?”
rating = gets.chomp

movies[title.to_sym] = rating.to_i

puts “The movie has been added”

when “update”

puts “Updated!”

when “display”

puts “Movies!”

when “delete”

puts “Deleted!”


puts “Error!”


I want to be able to fill the title before the question about ratings comes in ( line 15 and 18 )

Any hint ?

Thanks a lot !

What you ask does not really fit into the current lesson. Perhaps consider completing this unit then go into improvements once all the exercise code is built?

Is this the lesson to which you refer?


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