10.4k views
4 votes
A two-dimensional array has been defined to hold the quantity of each of 5 different healthy snack products sold in a tuckshop during the past three months. The array is declared as follows: sales = [ [ 0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0] ] Indexing of the array starts at 0, so the sales of the first product in the second month is held in sales[1][0].

2 Answers

5 votes

Final answer:

This question is about two-dimensional arrays in mathematics.

Step-by-step explanation:

This question is related to the topic of two-dimensional arrays in computer programming.

A two-dimensional array is a collection of elements organized in rows and columns. In this case, the array is used to hold the quantity of each of 5 different healthy snack products sold in a tuckshop over the past three months.

The array declaration sales = [ [ 0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0] ] creates a 3x5 array, where each row corresponds to a month and each column represents a different product.

User Wenus
by
4.8k points
2 votes

Answer:

1

Step-by-step explanation:

[0] = 1

[1] = 2

[3] = 3

and so on...

User Aloong
by
5.4k points