Respuesta :

Answer:

a = [[34,38,50,44,39],  

    [42,36,40,43,44],  

    [24,31,46,40,45],  

    [43,47,35,31,26],

    [37,28,20,36,50]]

     

for r in range(len(a)):

   for c in range (len(a[r])):

       if (a[r][c]% 3 != 0):

           a[r][c]=0

for i in range(len(a)):

   for j in range (len(a[i])):

       print(a[i][j], end=" ")

   print(" ")

Explanation:

We start off by declaring an array called "a". As introduced in the previous lessons, we use two for loops to fully go through all the rows and columns of the two-dimensional arrays. We then add in the line that checks if the remainder of any of these is not equal to zero, then print them as zero on the grid.

(I also got 100%)

mark as brainliest pls hehe

In this exercise we have to use the knowledge in computational language in python to describe a code that best suits, so we have:

The code can be found in the attached image.

What is the function range?

The range() function returns a number series in the range sent as an argument. The returned series is an iterable range-type object and the contained elements will be generated on demand. It is common to use the range() function with the for loop structure. In this way we have that at each cycle the next element of the sequence will be used in such a way that it is possible to start from a point and go incrementing, decrementing x units.

To make it simpler we can write this code as:

a = [[34,38,50,44,39],  [42,36,40,43,44],  [24,31,46,40,45],  [43,47,35,31,26],

[37,28,20,36,50]]

for r in range(len(a)):

  for c in range (len(a[r])):

      if (a[r][c]% 3 != 0):

          a[r][c]=0

for i in range(len(a)):

  for j in range (len(a[i])):

      print(a[i][j], end=" ")

  print(" ")

See more about python at brainly.com/question/19705654

Ver imagen lhmarianateixeira
Ver imagen lhmarianateixeira