C
C
casper192020-06-04 21:16:00
Python
casper19, 2020-06-04 21:16:00

How to square a function of all elements of even columns in python?

Let a matrix be given. Write a function to square all elements in an even column in python.

They gave the task, and there is not even additional information there. I don't even know where to start. Just recently started learning python

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arseny, 2020-06-05
Matytsyn @ArsenyMatytsyn

1. A matrix is ​​a two-dimensional array.
2. You need to go through the "rows" with a loop that takes into account the number of lines
3. Inside which, go through another loop through the elements in the "line", taking into account its size.
4. Every even square.
5. Even can be checked by modulo division .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question