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
ahrayia [7]
3 years ago
11

To iterate through (access all the entries of) a two-dimensional arrays you

Computers and Technology
1 answer:
ahrayia [7]3 years ago
6 0

Answer: You would need two loops to iterate through both dimensions

Explanation:

matrix = [[1,2,3,4,5],

              [6,7,8,9,10],

              [11,12,13,14,15]]

for rows in matrix:

    for numbers in rows:

         print(numbers)

The first loop cycles through all the immediate subjects in it, which are the three lists. The second loop calls the for loop variable and iterates through each individual subject because they are lists. So the first loop iterates through the 1st dimension (the lists) and the seconds loop iterates through the 2nd dimension (the numbers in the lists).

You might be interested in
Consider the conditions and intentions behind the creation of the internet—that it was initially created as a tool for academics
svp [43]

It should be noted that the intention for the creation of the internet was simply for resources sharing.

The motivation behind the creation of the internet was for resources sharing. This was created as a tool for academics and federal problem-solvers.

It transpired as it wasn't for its original purpose anymore. Its users employed it for communication with each other. They sent files and softwares over the internet. This led to the security vulnerabilities that can be seen today.

Learn more about the internet on:

brainly.com/question/2780939

5 0
3 years ago
Networking is the most effective search method for finding job leads.<br> a. True<br> b. False
natima [27]
True.
This is due to most companies having online websites in our era
3 0
3 years ago
Read 2 more answers
THIS IS PYTHON QUESTION
frozen [14]

Answer:

ok

Explanation:yes

4 0
3 years ago
Why the brain is most important???​
algol [13]

Answer:

It helps our body function

Explanation:

3 0
3 years ago
Read 2 more answers
Describe a situation in a program where you could write and use a "for loop".​
kykrilka [37]

Answer:

  • Use the one that reads most clearly.
  • If you can’t decide, just pick one.
  • If you can’t then use for()
  • If at any point later in time you change your mind, refactor your code.

This is how professionals work. Decide, and for all things with low impact to change, don’t sweat it.

Save that for architectural and API design choices.

Answer#2:

  • Well if you are looking for a simple technique to choose which loop to use you can use these rules.
  • Use for loops when there's a sequence of elements that you want to iterate.
  • Use while loops when you want to repeat an action until a condition changes.

And if whatever you are trying to do can be done with either for or while loops then just choose your favourite :)

8 0
2 years ago
Read 2 more answers
Other questions:
  • While visiting a web site during your lunch break, you see a window that states the web site will not operate properly without f
    13·1 answer
  • Which was the first media-sharing website that allowed users to submit their own work on the site?
    7·1 answer
  • What would you have to know about the pivot columns in an augmented matrix in order to know that the linear system is consistent
    13·1 answer
  • For this scenario related to turtle drawing, indicate whether it is better to write a loop or a function (or a set of functions)
    13·1 answer
  • In Java. Write a program that creates an integer array with 50 random values, prompts the user to enter the index of an element
    5·1 answer
  • And tags are examples of stand - alone tags.
    15·1 answer
  • Who is he can anyone help me​
    14·2 answers
  • It is where your cpu (processor) is installed
    10·2 answers
  • What connections do you see between variables and the Input-Output-Store-Process model of a computer?
    5·1 answer
  • How does communication produce clarity and direction​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!