Error! error!


#1

movies = {
"AugustRush" => 4.5
}
puts " Please enter some text"
text = gets.chomp

choice = case
when "add"
puts "add your title"
title = gets.chomp.to_sym
if movies[title.to_sym].nil
puts "the rating of your movie"
rating = gets.chomp.to_i
movies[title.to_sym] = rating.to_i
puts "The movie #{title} and the rating #{rating} was added"
puts whatever
else
puts "movie already exists"
end
when "update"
puts "Updated!"
when "display"
puts "Movies!"
when "delete"
puts "Deleted!"
else
could some tell me whats wrong with my code...


#2

What does the error message tell you?
At first glance, the end of your code is an else, with no argument following it.


#4

This post was flagged by the community and is temporarily hidden.