Log in from a computer to take this course

You'll need to log in from a computer to start Learn Ruby. But you can practice or keep up your coding streak with the Codecademy Go app. Download the app to get started.

apple storegoogle store
Learn

All right! You’re all on your lonesome. (Well, not quite. We’ll just leave this example here.)

a = 10 b = 11 if a < b print "a is less than b!" elsif b < a print "b is less than a!" else print "b is equal to a!" end

Instructions

1.

Create an if/else statement in the editor. Make sure to include at least one elsif. Each branch of the statement should print something to the console.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?