Each question in this quiz is timed.
What is the output from the following ruby statement:
puts (1 + 2 * 2)
5
6
3
4
puts (4 * 6 / 2 * 2)
24
0
What is the output from the following ruby expression:
puts (4 / 2 * 2 + 2 / 2)
2
puts (5 + 10 % 3 + 6 / 2)
9
\(5 \frac{1}{2} \)
\(6 \frac{1}{2} \)
puts (4 * 2 ** 2 * 2)
32
16
128
64
What is the output from the final ruby statement:
c = 3 d = 4 puts (c or d == 7)
true
false
1
What is the output of the last ruby statement
x = 5 && 4 puts x
x = 5 and 4 puts x
a = false b = true ! a || b = false puts b
What is the output from the following ruby statement
puts (13 & 10 << 1)
8
What is the output from the final ruby statement
a = false b = true puts (a && b ? 'foo' : 'bar')
foo
bar
a = false b = true puts (a and b ? 'foo' : 'bar')