15/20 why isnt this correct?


puts 1 < 2 ? "One is less than two" : "not"


You changed an if into an if/else. They ask to refactor the code, not change its logical structure.


nevermind, was using ternary instead of one-liners


So what is it meant to be?


puts "words" if truebooleanstatement

Make some substitutions to that and you should be good to go @sherifeji


yeah so what does it mean



As @arjofocolovi said I originally put an else statement rather than just using an if statement.
What @luminaire is showing is the structure of a one line if statement. as an example

puts "6 is less than ten!" if 6 < 10

puts is the action that Ruby will take if the "if" statement is true. Anyting in "" will be printed using puts. Then we use the "if" to add a condition to print "6 is less than ten!".

I could of confused you more but i hope it helps haha


okay thank you for the help.


I did:
puts "One is less than two." if 1 < 2
It keeps giving me the error: Oops, try again. Make sure your 'if' statement still has the same behavior. It should puts 'One is less than two!'


I found me problem. Why does it have to be so picky?


You should add "!" to the end of yours puts:
puts 1 < 2 ? "One is less than two!" : "not"