Ruby Ruby Basics Conditionals Comparison Operators

Using comparion operators, test whether the number 2 is less than the number 3. (We know, it is, but see if you can expr

number = 2 puts "#{number} is less than 3." if number < 3

answer = 5 puts "#{answer} is greater than 6." if answer > 6

what have i done wrong i keep get error msg

program.rb
number = 2
puts "#{number} is less than 3." if number < 3


answer = 5
puts "#{answer} is greater than 6." if answer > 6

1 Answer

adam n
adam n
57,278 Points
put 2 < 3
put 5 > 6

You just need to compare one number to the other, and output it to the screen.