if 11>2
puts "Eleven is greater than two"
end
print "You'r right"Select 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
3/6
Page
Pick an option on a question to see the right answer and solution.
if 11>2
puts "Eleven is greater than two"
end
print "You'r right"Select an option to see the answer and solution.
if 79>78
puts "True".upcase
if 9>8
puts "True".reverse
if 7==7
puts "equal".downcase
end
end
endSelect an option to see the answer and solution.
if 79>78
puts "True".upcase
if 9>8
puts "True".Upcase
if 7==7
puts "equal".downcase
end
end
endSelect an option to see the answer and solution.
Select an option to see the answer and solution.
x=1
if x > 2
puts "x is greater than 2"
elsif x <= 2 and x!=0
puts "x is 1"
else
puts "I can't guess the number"
endSelect 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.
if conditional
code...
elsif conditional
code..
else
code
endSelect an option to see the answer and solution.
if 1>2
puts "false"
else
puts "True"Select an option to see the answer and solution.
if 1>2
puts "false"
end
else
puts "True"
endSelect an option to see the answer and solution.
variable=true
if variable
puts "true"
else
puts "false"
endSelect an option to see the answer and solution.
variable="true".reverse
if variable
puts "true"
else
puts "false"
endSelect an option to see the answer and solution.
variable=true
if !variable
puts "true"
else
puts "false"
endSelect an option to see the answer and solution.
variable="true".length
if variable
puts "true"
else
puts "false"
endSelect an option to see the answer and solution.
Select an option to see the answer and solution.
counter=1
if counter<=5
puts (counter)
counter=counter+1
else
puts(counter)
counter=counter-1
endSelect an option to see the answer and solution.
#counter=1
if counter<=5
puts (counter)
counter=counter+1
else
puts(counter)
counter=counter-1
endSelect 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.