SCRIPT 2026 QUESTIONS AND ANSWERS
GUARANTEED TO PASS
◉ Arithmetic Operators. Answer: + - ** / % ***
◉ Integer / (div) rounds towards. Answer: negative infinity
◉ .0. Answer: 0.33333333333333333333333
◉ . Answer: 0
◉ -. Answer: -1
◉ -1 % 3. Answer: 2
◉ 25 % 3. Answer: 1
◉ Bitwise Operators. Answer: ~ | & ^ << >>
◉ 5 | 2. Answer: 7
,◉ 13 ^ 6. Answer: 11
◉ 5 << 2. Answer: 20
◉ <=> (spaceship operator). Answer: Returns -1/0/1 iff LHS is
smaller/equal/
larger than RHS
◉ Logical Operators. Answer: && || ! and or not
◉ Precedence of logical operators. Answer: Words have low
precedence (below =)
◉ Pseudo Variables - Objects. Answer: self, nil
◉ Pseudo Variables - Booleans. Answer: true, false
nil is false
all numbers (including 0) are true
◉ Pseudo Variables - Specials. Answer: __FILE__
,__LINE__
◉ Local Variable. Answer: start with lowercase letter (or _)
◉ Global Variable. Answer: start with $
$/ is the input record separator (newline)
$; is the default field separator (space)
◉ Instance Variable. Answer: start with @
◉ Class Variable. Answer: start with @@
◉ Mutability is determined by __________. Answer: variable name
◉ Condition Statements. Answer: if boolean_condition
...
elsif boolean_condition
...
end
unless boolean_condition
, ...
end
◉ Case Statements. Answer: [variable = ] case expression
when nil, value, type, /regexp/, or min..max
else
statements
end
◉ Syntax of while iteration. Answer: while boolean_condition
...
end
or
something while boolean_condition
or
begin ... end while boolean_condition
◉ Syntax of not while iteration. Answer: unless boolean_condition
...