Display problem

<meta http-equiv="content-type" content="text/html; 

charset=ISO-8859-1">

Hello,

I have this :

movies = {harry_potter:  9 }
 puts "Wat wil u doen : "
 choice = gets.chomp
 case choice
 when "add"
   puts "welke film wilt u toevoegen"
   title = gets.chomp
   puts "welke rating krijgt deze film"
   rating = gets.chomp
   if movies[title.to_sym].nil?
       movies[title.to_sym] = rating.to_i
       puts "Deze film is toegevoegd"
   else
       puts "Deze flim is al toegevoegd"
   end
 when "update"
   puts "welke film wilt u wijzigen"
   title = gets.chomp
   if movies[title.to_sym].nil?
       puts "Deze film is niet in de database"
   else
       puts "Welke rating moet de film nu krijgen"
       rating = gets.chomp
        movies[title.to_sym] = rating.to_i
        puts "Deze film heeft nu als rating : #{rating}. "
   end
 when "display"
   movies.each { |movie,rating| puts "#{movie}:#{rating}"}
 when "delete"
   puts "Deleted!"
 else
    puts "Error!"
 end
 
 
But when I choose display. I see this output :


Wat wil u doen :
 
display
harry_potter:9

{:harry_potter=>9}

but still I see this error :


Oops, try again. It looks like your 'puts' doesn't include harry_potter: 9.

Roelof

On Wed, Nov 19, 2014 at 8:09 AM, Roelof W. [email protected] wrote:

title = gets.chomp
title = gets.chomp
when “delete”
display
harry_potter:9
{:harry_potter=>9}

but still I see this error :

Oops, try again. It looks like your ‘puts’ doesn’t include harry_potter: 9.

Maybe they are expecting a space after the colon?

harry_potter: 9

Jesus.

Jes??s Gabriel y Gal??n schreef op 19-11-2014 8:53:

puts "welke film wilt u toevoegen"
puts "welke film wilt u wijzigen"
movies.each { |movie,rating| puts "#{movie}:#{rating}"}

Wat wil u doen :
harry_potter: 9

Jesus.

Thanks, wierd
I tried it earlier without any success but now I did perfectly.

Roelof