Prompting: Redux!


#32

No.

Go back to the first lessons on variables, they show you how to create variables. And do ALL exercises. You don't have the basics to solve this exercise just yet.

Start here:

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


#33

@arjofocolovi
thanks for the help


#34

No problem. Take your time and make sure you understand the concept before moving to a next one. Good luck.


#36

Im back so is that the answer.


#37

I need help, I'm still stuck on this one "A night at the movies."


#38

movies = {
:"Scott Pilgrim vs. the World" => 5,
}

puts "what movies you life?"
answer = gets.chomp


#39

Now I have this

case choice
when "add"
puts "Added!"
when "update"
puts "Updated!"
when "display"
puts "Movies!"
when "delete"
puts "Deleted"
else
puts "Error!"
end


#40

Abergeron,

I'm putting my answer here for you to see. BUT don't just copy my answer. Try to understand it and make your own version. Hope this helps you along.

 movies = {
 Star_Wars: 5,
 Matrix: 5
}
puts "What would you like to do (Add, Update, Display, Delete)"

choice = gets.chomp

case choice
when "add"
    puts "Enter Movie Title"
    title = gets.chomp
    puts "Enter a rating!"
    rating = gets.chomp
    movies[title] = rating
    puts "Movie has been added!"
when "update"
    puts  "Updated!"
when "display"
    puts "Movies!"
when "delete"
    puts "Deleted!"
else
    puts "Error!"
end

#41

I got this syntax error

What would you like to do (Add, Update, Display, Delete)


#42

It seems like you want this handed to you without doing any work; Scriptsurfer03439's code is completely accurate. Supply All of your coding.


-The code should be properly formatted and make sure to "quote" the statements in puts, with proper indentation as well.
--Please stop using bits of words and expecting help without giving specifics, it does not help anyone.


#43

I got this answer, please help.

movies = {
 Star_Wars: 5,
 Matrix: 5
}
puts "What would you like to do (Add, Update, Display, Delete)"

choice = gets.chomp

case choice
when "add"
    puts "Enter Movie Title"
    title = gets.chomp
    puts "Enter a rating!"
    rating = gets.chomp
    movies[title] = rating
    puts "Movie has been added!"
when "update"
    puts  "Updated!"
when "display"
    puts "Movies!"
when "delete"
    puts "Deleted!"
else
    puts "Error!"
end

#44

it doesn't work still, I tried over and over and it still won't work but please help me.:smile:


#45

Try erasing Matrix and its value, if that doesn't work, use someone else's computer if you can
-Did you enter add when you ran the program? If you didn't that is your problem right there.


Hang on a minute,

Did it work and your pulling a leg? Because your code is perfectly fine


#46

No I tried it yesterday but it won't work.


#47

movies = {
Star_Wars: 5,

}
puts "What would you like to do (Add, Update, Display, Delete)"

choice = gets.chomp

case choice
when "add"
puts "Enter Movie Title"
title = gets.chomp
puts "Enter a rating!"
rating = gets.chomp
movies[title] = rating
puts "Movie has been added!"
when "update"
puts "Updated!"
when "display"
puts "Movies!"
when "delete"
puts "Deleted!"
else
puts "Error!"
end


#48

never mind it worked I found out what was wrong


#49

Yay!
Was it because Star_Wars was capitalised?


#50

Copy DonE ...... thanks****


#51

Where’s your .to_i after movies[title] = rating?


#52

A post was split to a new topic: It looks like you didn’t add to the movies hash!