51. What does the **= assignment operator do?
52. 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
53. What is the output of the given code?
counter = 100
while counter > 0
puts counter
counter-=25
end
counter = 100
while counter > 0
puts counter
counter-=25
end
54. What will be the output of the given code?
boolean_1 = !true
puts boolean_1
boolean_2 = !true && !true
puts boolean_2
boolean_1 = !true
puts boolean_1
boolean_2 = !true && !true
puts boolean_2
55. What is the output of the given code?
a="string"
b="strings"
if(a==b)
print ("a and b are same")
else
print "Not same"
end
a="string"
b="strings"
if(a==b)
print ("a and b are same")
else
print "Not same"
end
56. 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
57. What is the output of the given code?
counter=1
if counter<=5
puts (counter)
counter=counter+1
counter=1
if counter<=5
puts (counter)
counter=counter+1
58. What will the following code evaluate to?
a=9!=10
a=9!=10
59. What will be the output of the given code?
boolean_1 = false || -10 > -9
puts boolean_1
boolean_1 = false || -10 > -9
puts boolean_1
60. What will be the output of the given code?
boolean_1 = (3 < 4 || false) && (false || true)
puts boolean_1
boolean_1 = (3 < 4 || false) && (false || true)
puts boolean_1