When you run the code it asks you "What is your favorite number" and lets you write in any number of your choice, then says "My favorite number is 6. " like it should, but after that it displays the error message "comparison of String with 6 failed" instead of showing one of the 4 different options depending on what number you put in. What am I doing wrong?
print "What is your favorite number?" your_number=gets print "My favorite number is 6. " my_number = 6 if your_number==my_number print "We have the same favorite number!" elsif your_number>my_number print "Your favorite number is bigger than mine!" else your_number<my_number print "Your favorite number is smaller than mine!" end