Quiz
What is the result of 2 + 2 * 5 ** 2?
10252400100What is the result of (2 + 2) * 5 ** 2?
10252400100What is the result of 102 / 10?
10210.22.0What is the result of 102 / 10.0?
10210.22.0What is the result of 102 % 10?
10210.22.0What is the result of 4.5.ceil?
454.05.0ceil method rounds up to the nearest integer.What is the result of 4.5.floor?
454.05.0floor method rounds down to the nearest integer.What is the result of 4.5.round?
454.05.0round method rounds to the nearest integer and rounds up if the fractional part of the float is .5.What is the result of 4.5.to_i?
454.05.0to_i method rounds down to the nearest integer.What is the result of 4.to_f?
454.05.0to_f method type converts an integer to a float.What is the result of 5.to_s?
55.0"5.0""5"to_s method type converts an object to a string.What is the result of false.to_s?
0true"false"falseto_s method type converts an object to a string, regardless of that object's data type.