wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Arrays, Lists, and Tuples

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

What is the main difference between arrays and lists?

a)

Arrays are contiguous data items, while lists are not

b)

Arrays can store multiple data types, while lists can only store a single data type

c)

Arrays can change in size after creation, while lists have a fixed size

d)

Arrays are zero-indexed, while lists are one-indexed

2.

How can you access the second item in an array or list?

a)

By using index 0

b)

By using index 1

c)

By using index 2

d)

By using index 3

3.

What is the difference between arrays and tuples?

a)

Arrays are mutable, while tuples are immutable

b)

Arrays have a fixed size, while tuples can grow and shrink

c)

Arrays can store multiple data types, while tuples can only store a single data type

d)

Arrays are zero-indexed, while tuples are one-indexed

4.

What is the purpose of a record data structure?

a)

To store a collection of related fields with different data types

b)

To store a fixed-size list of items

c)

To store a two-dimensional table of data

d)

To store a cube-like structure with multiple dimensions

5.

What is the main difference between lists and tuples?

a)

Lists are mutable, while tuples are immutable

b)

Lists have a fixed size, while tuples can grow and shrink

c)

Lists can store multiple data types, while tuples can only store a single data type

d)

Lists are zero-indexed, while tuples are one-indexed

6.

What is the purpose of index 0 in an array or list?

a)

To access the first item

b)

To access the second item

c)

To access the last item

d)

To access the item at index 1

7.

Can arrays change in size after they've been created?

a)

Yes, arrays can grow and shrink

b)

No, arrays have a fixed size

c)

Yes, arrays can only grow in size

d)

No, arrays can only shrink in size

8.

What is the main difference between arrays and tuples?

a)

Arrays are contiguous data items, while tuples are not

b)

Arrays can store multiple data types, while tuples can only store a single data type

c)

Arrays can change in size after creation, while tuples have a fixed size

d)

Arrays are zero-indexed, while tuples are one-indexed

9.

What is the purpose of a record data structure?

a)

To store a collection of related fields with different data types

b)

To store a fixed-size list of items

c)

To store a two-dimensional table of data

d)

To store a cube-like structure with multiple dimensions

10.

Can tuples be changed or altered after they've been created?

a)

Yes, tuples can be modified

b)

No, tuples are immutable

c)

Yes, tuples can only grow in size

d)

No, tuples can only shrink in size

11.

What is the main difference between lists and tuples?

a)

Lists are mutable, while tuples are immutable

b)

Lists have a fixed size, while tuples can grow and shrink

c)

Lists can store multiple data types, while tuples can only store a single data type

d)

Lists are zero-indexed, while tuples are one-indexed

12.

What is the purpose of index 1 in an array or list?

a)

To access the first item

b)

To access the second item

c)

To access the last item

d)

To access the item at index 0

13.

Can lists be changed or altered after they've been created?

a)

Yes, lists can be modified

b)

No, lists are immutable

c)

Yes, lists can only grow in size

d)

No, lists can only shrink in size

14.

What is the main difference between arrays and tuples?

a)

Arrays are contiguous data items, while tuples are not

b)

Arrays can store multiple data types, while tuples can only store a single data type

c)

Arrays can change in size after creation, while tuples have a fixed size

d)

Arrays are zero-indexed, while tuples are one-indexed

15.

What is the purpose of a record data structure?

a)

To store a collection of related fields with different data types

b)

To store a fixed-size list of items

c)

To store a two-dimensional table of data

d)

To store a cube-like structure with multiple dimensions