Prompting: Redux!


#1

movies = {
carmen: 3,
car: 1,

}

puts "Do you like coding?"
"-- yes"
"--no"
choice = gets.chomp

case choice
when "add"
puts "title of movie"
title = gets.chomp
puts "rate the move"
rating = gets.chomp
when "update"
puts "updated"
when "deleted!"
puts "deleted!"
else
puts"Error!"
end

"Looks like you didn't add the movie hash!"

Can you be so kind as to point out what I am missing? Thanks in advance.... :slight_smile:


#2

Is it supposed to be named movie or movies?
Does ruby crash? If so, it won't have created the hash, right.


#3

movies hash, my mistake.


#4

https://www.codecademy.com/courses/ruby-beginner-en-0i8v1/0/4?curriculum_id=5059f8619189a5000201fbcb


#5

That's what you've already got in your code though.

No idea if you solved it, and if you didn't, I've got nothing to go by. Looks like what you need to do is to read the instructions more carefully, I can't do that though, not knowing which exercise it is, or at least not how to access it since I have no link and don't know where it is.

edit oh ok. that's a bit more to go by.

Well, it asks you if you've done something, and it doesn't look like you have.


#6

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

Stuck on this part.


#7

Perhaps you'd like to ask for some piece of information that lets you move on.

Just saying that you're stuck doesn't really say much about what you need.


#8

Can anyone help me out here?