Select an option to see the answer and solution.
Operators in Ruby
practice.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
61
Questions
2/4
Page
Pick an option on a question to see the right answer and solution.
counter = -50
while counter <0
puts counter
counter+=10
endSelect an option to see the answer and solution.
boolean_1 = 2**3 != 3**2 || true
puts boolean_1Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
a = 5
b=10
while a <10 && b<20
puts a+b
a+=2
b+=2
endSelect an option to see the answer and solution.
a = 5
b=10
while a <10 || b<20
puts a*b
a+=2
b+=2
endSelect an option to see the answer and solution.
Select an option to see the answer and solution.
counter=counter+1 and counter++Select an option to see the answer and solution.
a = 5
b=10
while (a <10 || b<20)&&true
puts a*b
a+=2
b+=2
endSelect an option to see the answer and solution.
Select an option to see the answer and solution.
boolean_1 = !(700 / 10 == 70)
puts boolean_1Select an option to see the answer and solution.
boolean_1 = 77 < 78 && 77 < 77
puts boolean_1Select an option to see the answer and solution.
boolean_2 = !true && (!true || 100 != 5**2)
puts boolean_2Select an option to see the answer and solution.
boolean_1 = !(3 < 4 || false) && (false || true)
puts boolean_1Select an option to see the answer and solution.
Select an option to see the answer and solution.
a = 22.5
while a >11.5
puts a
a-=3.5
endSelect an option to see the answer and solution.
counter = 100
while counter > 0
puts counter
counter/=5
endSelect an option to see the answer and solution.