a=[1,2,3,4,5]
b=[1,2,3,4,5]
if a==b
print "Equal"
else
print "Not equal"
endSelect an option to see the answer and solution.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
78
Questions
4/4
Page
Pick an option on a question to see the right answer and solution.
a=[1,2,3,4,5]
b=[1,2,3,4,5]
if a==b
print "Equal"
else
print "Not equal"
endSelect an option to see the answer and solution.
array1 = [0,0,0]
array2 = [0,0,0]
if array1 == array2
print "They are equal"
else
print "Not equal"
endSelect an option to see the answer and solution.
a=["hey", "ruby", "language"]
b=["hey", "language", "ruby"]
if a==b
print "Equal"
else
print "Not equal"
endSelect an option to see the answer and solution.
string_array = ["a","e","i","o","u"]
boolean_array = ["True","False"]
puts string_array[3]
puts boolean_arraySelect an option to see the answer and solution.
a=[1,2,3,4,5]
b=[1,2,4,6,8]
if a[3]==b[2]
print "Equal"
endSelect an option to see the answer and solution.
array = [100, 200, 300, 400, 500]
print array[5]Select an option to see the answer and solution.
Select an option to see the answer and solution.
a=["hey", "ruby", "language"]
b=[1, 2, 3]
puts b[1]
puts a[2]Select an option to see the answer and solution.
string_array = ["a","e","i","o","u"]
print string_arraySelect an option to see the answer and solution.
string_array = ["a","e","i","o","u"]
print string_arraySelect an option to see the answer and solution.
string_array = ["a","e","i","o","u"]
boolean_array = ["True","False"]
puts string_array[3]
puts boolean_array[1]Select an option to see the answer and solution.
array1 = [[1,2,3,4,5],[0,0,0,0]]
array2 = [[1,2,3],[0,0,0]]
print array1 || array2Select an option to see the answer and solution.
a=["hey", "ruby", "language"]
b=[1, 2, 3]
puts b[1]
puts a[2]Select an option to see the answer and solution.
a=["hey", "ruby", "language"]
b=["hey", "language", "ruby"]
if a==b
print "Equal"
else
print "Not equal"
endSelect an option to see the answer and solution.
string_array = ["a","e","i","o","u"]
boolean_array = ["True","False"]
puts string_array[3]
puts boolean_arraySelect an option to see the answer and solution.
array1 = [[1,2,3,4],[0,0,0,0]]
array2 = [[1,2,3,4],[0,0,0,0]]
if array1==array2
print "Equal"
else
print "Not equal"
endSelect an option to see the answer and solution.
Select an option to see the answer and solution.
multi_d_array = [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]
print multi_d_arraySelect an option to see the answer and solution.