1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Paladinen [302]
3 years ago
10

A two-dimensional array has been defined to hold the quantity of each of 5 different healthy snack products sold in a tuckshop d

uring 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].
Computers and Technology
1 answer:
Olegator [25]3 years ago
3 0

Answer:

1

Explanation:

[0] = 1

[1] = 2

[3] = 3

and so on...

You might be interested in
Implement the function printTwoLargest that inputs an arbitrary number of positive numbers from the user. The input of numbers s
meriva

Answer:

The function in Python is as follows:

def printTwoLargest():

   chk = 0

   list1 = []

   num = int(input("Enter: "))

   while num > 0:

       for i in list1:

           if i == num:

               chk+=1

               break;

       if chk == 0:

           list1.append(num)

       chk = 0

       num = int(input("Enter: "))

   list1.sort()

   if len(list1) >= 2:

       print("Largest:", list1[-1])

       print("Second:", list1[-2])

   else:

       print("Length of list must be at least 2")

Explanation:

This defines the function

def printTwoLargest():

This initializes a check variable to 0

   chk = 0

This initializes an empty list

   list1 = []

This prompts the user for input

   num = int(input("Enter: "))

The following loop is repeated until input is 0 or negative

   while num > 0:

<em>The following for loop checks for duplicate</em>

<em>        for i in list1: </em>

<em>            if i == num: </em><em>If duplicate is found</em><em> </em>

<em>                chk+=1 </em><em>The check variable is set to 1</em><em> </em>

<em>                break; </em><em>And the for loop is exited</em><em> </em>

The input is appended to the list if the check variable is 0 (i.e. no duplicate)

<em>        if chk == 0: </em>

<em>            list1.append(num) </em>

This sets the check variable back to 0, for another input

       chk = 0

This prompts the user for another input

       num = int(input("Enter: "))

This sorts the list

   list1.sort()

This prints the two largest if valid user input is 2 or more

<em>    if len(list1) >= 2: </em>

<em>        print("Largest:", list1[-1]) </em>

<em>        print("Second:", list1[-2]) </em>

if otherwise, this prints that the length must be at least 2

<em>    else: </em>

<em>        print("Length of list must be at least 2")</em>

3 0
3 years ago
Katarina is deciding whether to buy a desktop or a laptop computer. What will most likely help Katarina make her decision?
Gnesinka [82]
Laptops are portable decides , while desktops remain in one plcae
4 0
3 years ago
Read 2 more answers
When entering data into a cell, which keyboard key is used to remove characters to the left of the insertion point?
deff fn [24]
The backspace key is used for that
3 0
3 years ago
Select all phrases that describe a server-based network. centralized network security easy to expand log-ins controlled by centr
slamgirl [31]

Answer:

Client Server Network ... is the central computer that enables authorized users to access networked resources ... computers in this type of network are connected to a central hub ... why might a business choose a server based network (3) ... 2) easier to expand ... external hardware connected to and controlled by a computer.

Explanation:

8 0
3 years ago
Read 2 more answers
With new laws requiring the storage of emails and other important​ documents, information systems storage now exceeds approximat
lidiya [134]

Answer: zettabytes

Explanation:

Information system, is simply referred to as an integration of a set of components that are vital for the collection, storage and the processing of data and also important for the provision of information, and knowledge.

With new laws requiring the storage of emails and other important​ documents, information systems storage now exceeds approximately 4.7​ zettabytes.

7 0
4 years ago
Other questions:
  • _____ provide the standards, syntax, statements, and instructions for writing computer software
    14·1 answer
  • Business ethics are?
    9·1 answer
  • Which process improves the life of a computer?
    11·1 answer
  • In computer security, the term "Dumpster diving" is used to describe a practice of sifting through trash for discarded documents
    7·1 answer
  • An expression involving byte, int, and literal numbers is promoted to which of these?
    12·1 answer
  • Which of the following solutions enables simultaneous digital transmission of voice, video, data, and other network services ove
    7·1 answer
  • An administrator has just changed the IP address of an interface on an IOS device. What else must be done in order to apply thos
    5·2 answers
  • How can using Prezi software for a presentation allow the presenter to better respond to audience needs?
    10·1 answer
  • I hack3d into my schools computer system to unblock everything but now I am scared that I am going to get caught so I want to de
    13·2 answers
  • How to tell if your cell phone is being tracked tapped or monitored by spy software?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!