Quiz: Interacting with the Command-Line Interface

Strengthen your code evaluation skills by taking this short quiz.

1

What is the output of the following code?

11.times do |x|
    if x < 5
        print x
    else
        break
    end
end
A)

12345678910

B)

0123456789

C)

12345

D)

01234

Question 1 of 50 attempted

Get hands-on with 1400+ tech skills courses.