Quiz

2 belongs to the ____ data type.

String Float Integer Boolean 2 is a number without a decimal point, i.e., an integer.

2.0 belongs to the ____ data type.

String Float Integer Boolean 2.0 is a number with a decimal point, i.e., a float.

"The Cat in the Hat" belongs to the ____ data type.

String Boolean Integer Nil The enclosing quotation marks denote a string.

"" belongs to the ____ data type.

String Boolean Integer Nil "" is an empty string.

"1" belongs to the ____ data type.

String Boolean Integer Nil Although 1 is an integer, "1" is a string due to the enclosing quotation marks.

"nil" belongs to the ____ data type.

String Boolean Integer Nil Although nil belongs to the Nil data type, "nil" is a string due to the enclosing quotation marks.

nil belongs to the ____ data type.

String Boolean Integer Nil nil is the sole instance of the Nil data type.

true and false are ____.

Strings Nils Booleans Integers true and false are the only booleans.

"true" and "false" are ____.

Strings Nils Booleans Integers true and false are booleans, but "true" and "false" are strings due to the enclosing quotation marks.

results matching ""

    No results matching ""