a) Explain the concepts of Fixnum and Bignum in Ruby
b) Explain the concepts of Float::EPSILON, Float::MIN, and Float::MAX in Ruby
c) Explain and exemplify the inclusive range and exclusive range in Ruby
d) Describe the concept of dynamic typing in Ruby
e) Explain the meaning of variables and the role and applicability of the following program:
def trace
return unless $trace
p @a / p @b / p @c
end
f) Show a short program that defines a hash and prints its values
g) Show a short program that opens a text file and displays its lines and index
a) Fixnum and Bignum are classes to store integer values.
Fixnum is used to store values for -262 to 262 - 1 and values greater or lesser than this range will be stored in
Bignum class.
b) Float::EPSILON
The difference between 1 and the smallest double-precision floating point number greater than 1.
Defaults to 2.2204460492503131e-16.
Float::MIN
The smallest positive normalized number in a double-precision floating point.
Defaults to 2.2250738585072014e-308.
Float::MAX
The largest possible number in a double-precision floating point number.
Defaults to 1.7976931348623157e+308.
Note: Please ask other in another question.
a) Explain the concepts of Fixnum and Bignum in Ruby b) Explain the concepts of Float::EPSILON, Float::MIN, and Float::MAX in Ruby c) Explain and exemplify the inclusive range and exclusive range in R...