21. What is the result of the expression: !(true && false) in Ruby?
22. What is the output of the given code?
counter = -50
while counter <0
puts counter
counter+=10
end
counter = -50
while counter <0
puts counter
counter+=10
end
23. What will be the output of the given code?
boolean_1 = 2**3 != 3**2 || true
puts boolean_1
boolean_1 = 2**3 != 3**2 || true
puts boolean_1
24. Which of the following is a valid boolean operator?
25. Ruby does not support ++ operator, it only supports += operator.
26. Assignment operator is also known as relational operator.
27. The == 'is equal to' is known as relational operator.
28. What is the output of the given code?
a = 5
b=10
while a <10 && b<20
puts a+b
a+=2
b+=2
end
a = 5
b=10
while a <10 && b<20
puts a+b
a+=2
b+=2
end
29. What is the output of the given code?
a = 5
b=10
while a <10 || b<20
puts a*b
a+=2
b+=2
end
a = 5
b=10
while a <10 || b<20
puts a*b
a+=2
b+=2
end