R
R
romuldavid2017-11-10 11:46:59
Python
romuldavid, 2017-11-10 11:46:59

Looping through an array with a given condition in python 3?

There is an array (test.csv) where numbers with a semicolon are stored. It is necessary to sort through all of them, dividing them into two columns. The condition is as follows: if number 2 >= number 1 by 5% in the first column, if number 2 <= number 1 by 5% in the second column. If the conditions are not met, the number does not fall into the columns. If the number 2 fulfills one of the conditions, then the number 3 is already compared with the number 2. And so on until the end of the list. Help me to understand

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kzoper, 2017-11-10
@kzoper

What exactly is the problem?
You read the file, go through the lines, see if the number fulfills your conditions.
Profit.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question