Oops, try again. It looks like your program doesn't puts 'Ruby is great for web apps!' when language == 'Ruby'


#1



Can you check my code?

https://www.codecademy.com/en/courses/ruby-beginner-en-1o8Mb/3/3?curriculum_id=5059f8619189a5000201fbcb


puts "What's your favorite language?"
language = gets.chomp
case language

when language == "Ruby"
  puts "Ruby is great for web apps!"
when language == "Python"
  puts "Python is great for science."
when language == "JavaScript"
  puts "JavaScript makes websites awesome."
when language == "HTML"
  puts "HTML is what websites are made of!"
when language == "CSS"
  puts "CSS makes websites pretty."
else
  puts "I don't know that language!"
end.


#2

Or course it doesn't:

end.

What is this? The end of a sentence? Take the . Off of end and see if that works.

end


#3

It still says the same thing when I took the period out.


#4

you need to put the "then" stuff. Right now its not tidy. The instructions say to make it tidy.

Refactor the if/elsif/else statement in the editor into a tidy case statement.

when "Ruby" then puts "Ruby is great for web apps!"

#5

Here is your code debugged:

puts "What's your favorite language?"
language = gets.chomp

case language

when "Ruby"
       puts "Ruby is great for web apps!"

when "Python"
puts "Python is great for science."
when "JavaScript"
puts "JavaScript makes websites awesome."
when "HTML"
puts "HTML is what websites are made of!"
when "CSS"
puts "CSS makes websites pretty."
else
puts "I don't know that language!"
end.


#6

puts "What's your favorite language?"
language = gets.chomp

case language

when "Ruby"
puts "Ruby is great for web apps!"
when "Python"
puts "Python is great for science."
when "JavaScript"
puts "JavaScript makes websites awesome."
when "HTML"
puts "HTML is what websites are made of!"
when "CSS"
puts "CSS makes websites pretty."
else
puts "I don't know that language!"
end.
i tried this AND it still doesnt wortk


#7

Yup that's the right answer thanks mate.