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]
2 years ago
11

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

Computers and Technology
1 answer:
ahrayia [7]2 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
When a user runs an application, what transfers from a storage device to memory?
jolli1 [7]
It is:
b. instructions


6 0
3 years ago
Write a program using python 3 that asks the user how many integers they would like to enter. You can assume that this initial i
mixer [17]

I've included my code in the picture below. Best of luck.

8 0
2 years ago
How are you today? I'm fine
sweet-ann [11.9K]

Answer:

no this is partick.

Explanation:

8 0
3 years ago
Read 2 more answers
I have a problem with a task using scipy.optimize.minimize execution through the following methods: CG, BFG, Newton-CG, L-BFGS-B
Scilla [17]

Answer:

Touch and hold a clip to pin it. Unpinned clips will be deleted after 1 hour.

3 0
2 years ago
Write a program that asks the user how many names they have. (If they have a first name, two middle names, and a last name, for
tankabanditka [31]

Answer:

The solution is implemented in python:

numnames = int(input("Number of Names: "))

nametitle = ["Surname: ","Firstname: ","Middlename: ","Middlename 2: "]

names = []

for i in range(numnames):

   name = input(nametitle[i])

   names.append(name)

   

print("Your fullname is: ",end=" ")

for i in names:

   print(i,end=" ")

Explanation:

This prompts user for number of names

numnames = int(input("Number of Names: "))

This lists the name titles in a list

nametitle = ["Surname: ","Firstname: ","Middlename: ","Middlename 2: "]

This initializes an empty list

names = []

The following for loop get names from the user

<em>for i in range(numnames):</em>

<em>    name = input(nametitle[i])</em>

<em>    names.append(name)</em>

   

The following instructions print the user fullnames

<em>print("Your fullname is: ",end=" ")</em>

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

<em>    print(i,end=" ")</em>

5 0
2 years ago
Other questions:
  • An air-conditioning system's automatic controller might directly control the
    7·2 answers
  • • The technical support department at your company has informed you that you will be receiving a new computer within the next we
    6·1 answer
  • Discuss the importance of employee security awareness training. What innovative ways should company’s implement security trainin
    14·1 answer
  • What function would you use to find the mean in a Microsoft excel document ?
    6·2 answers
  • What is the difference between Notepad and WordPad?is one more adavnced?if so which one or Notepad is the Mac equivalent of Word
    7·1 answer
  • A user reports network resources can no longer be accessed. The PC reports a link but will only accept static IP addresses. The
    6·1 answer
  • Is(are) input value(s) to use with a program to test the accuracy of the output.
    5·2 answers
  • Write a program for determining if a year is a leap year. In the Gregorian calendar system you can check if it is a leaper if it
    15·1 answer
  • Does anyone know 7.1.3: Firework karel?
    5·1 answer
  • What is a program that includes a function parameter capable of doing?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!