Q101
Open questionSelect an option to see the answer and solution.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
120
Questions
6/6
Page
Pick an option on a question to see the right answer and solution.
Q101
Open questionSelect an option to see the answer and solution.
Q102
Open questioncounter = 1
until counter > 10
puts counter
counter+=1
endSelect an option to see the answer and solution.
Q103
Open questioncounter = 0
until counter >= 10
puts counter
counter+=1
endSelect an option to see the answer and solution.
Q104
Open questioni = 3
while i > 0 do
puts i
i -= 1
end
j = 3
until j == 0 do
puts j
j -= 1
endSelect an option to see the answer and solution.
Q105
Open questiona="hungry"
until !a
puts "hungry"
a=!a
endSelect an option to see the answer and solution.
Q106
Open questionm= 8
loop do
m += 2
puts m
break if m == 16
endSelect an option to see the answer and solution.
Q107
Open questionm=0
loop do
print "ruby"
m+=1
break if m==5
endSelect an option to see the answer and solution.
Q108
Open questionm=0
loop do
puts m*10
m+=1
break if m==5
endSelect an option to see the answer and solution.
Q109
Open questionm=0
loop do
puts 101
m+=1
break if m==5
endSelect an option to see the answer and solution.
Q110
Open questionm=5
loop do
m-=1
break if m==0
endSelect an option to see the answer and solution.
Q111
Open questionfor num in 1...5
puts num
endSelect an option to see the answer and solution.
Q112
Open questionSelect an option to see the answer and solution.
Q113
Open questionfor num in 1..3
puts num
for i in 1..2
puts num*i
end
endSelect an option to see the answer and solution.
Q114
Open questionm= 0
loop do
m += 1
print m
break if m == 10
endSelect an option to see the answer and solution.
Q115
Open questionfor num in 1..5
puts num*num
endSelect an option to see the answer and solution.
Q116
Open questionfor num in 1..3
puts num*num
m= 0
loop do
m += 1
puts m
break if m == 3
end
endSelect an option to see the answer and solution.
Q117
Open questionloop do
m += 1
puts m
break if m == 3
endSelect an option to see the answer and solution.
Q118
Open questioni=1
for i in 5..10
puts i^2
endSelect an option to see the answer and solution.
Q119
Open questionSelect an option to see the answer and solution.
Q120
Open questioni=5
j=10
for i in 5..10 && j in 5..10
puts i**j
endSelect an option to see the answer and solution.