Variables and Data Types Answers

16 verified answers3 views
1
Free Preview

Which of the following are common data types? Check all that apply.

A
integers
B
characters
C
extents
D
floating point numbers
E
Boolean
F
alphanumeric strings
3

The data type in a weakly typed language before the variable can be used.

A
must not be selected
B
stays the same
C
changes
D
does not have to be stated
4

An example of a weakly typed language is .

A
Visual Basic
B
Python
C
JavaScript
6

Which of the following are characteristics of the Boolean data type? Check all that apply.

A
It holds infinite values.
B
It uses operators such as AND, OR, and NOT.
C
It holds a TRUE or FALSE value.
D
It is named after a nineteenth-century mathematician and logician
7

Which of the following statements are true of an integer data type? Check all that apply.

A
It can be a whole number.
B
It can be a negative number.
C
It uses TRUE/FALSE statements.
D
It represents temporary locations.
E
It cannot hold a fraction or a decimal number.
8

Identify the correct characteristics of Python numbers. Check all that apply.

A
Python numbers can be large integers.
B
Python numbers can be complex values such as 12B16cd.
C
Python numbers can be floating-point numbers.
D
Python numbers have numeric values.
E
Python numbers are created automatically.
9

Identify the correct characteristics of Python strings. Check all that apply.

A
Python strings connect sets of characters inside quotation marks.
B
Python strings change numbers into integers.
C
Python strings can be used to store text.
D
Python strings use either single quotes or double quotes.
10

Identify the correct characteristics of Python lists. Check all that apply.

A
Python lists are enclosed in curly braces { }.
B
Python lists contain items separated by commas.
C
Python lists are versatile Python data types.
D
Python lists may use single quotes, double quotes, or no quotes.
11

Identify the correct characteristics of Python tuples. Check all that apply.

A
Python tuples can be updated.
B
Python tuples are similar to Python lists.
C
Python tuples are enclosed in brackets [ ].
D
Python tuples are versatile.
E
Python tuples are read-only lists.
12

Which of these are characteristics of variables? Check all that apply.

A
Variables can be local or global.
B
Variables cannot be changed.
C
Variables have keys and values within brackets [ ].
D
Variables have connected sets of characters.
E
Variables have names, extents, and scopes.
13

Which of the following are characteristics of global variables? Check all that apply.

A
They are accessible from anywhere in the program.
B
They are accessible only in specific regions of a program.
C
They are accessible only within a declared function.
D
They are accessible during the entire time the program is running.
15

Identify the correct characteristics of a Python dictionary. Check all that apply.

A
A Python dictionary is a container.
B
A Python dictionary has keys and corresponding values.
C
A Python dictionary is enclosed in curly braces { }.
D
A Python dictionary can store any combination of Python objects.

Did you find these answers helpful?