Step 4 - Set Indexes

For this case we use the file export_csv.py, we execute it using:

python FORMULAS/export_csv.py <txt_file>

Where <txt_file> is the txt file that we have been working on since Step 2, in this case:

python FORMULAS/export_csv.py quadratic

The screen that will show us is the following:

-----------------------------
Select the formula to create the csv

1: ax^2+bx+c=0

2: ax^2+bx=-c

3: x^2+{b\over a}x=-{c\over a}

4: x^2+{b\over a}x+\left({b\over 2a}\right)^2=-{c\over a}+\left({b\over 2a}\right)^2

5: \left(x+{b\over 2a}\right)^2=-{c\over a}+\left({b\over 2a}\right)^2

6: \left(x+{b\over 2a}\right)^2=-{c\over a}+{b^2\over 4a^2}

7: \left(x+{b\over 2a}\right)^2={b^2\over 4a^2}-{c\over a}

8: \left(x+{b\over 2a}\right)^2={b^2\over 4a^2}-{4c\over 4a}

9: \left(x+{b\over 2a}\right)^2={b^2\over 4a^2}-{4ac\over 4a^2}

10: \left(x+{b\over 2a}\right)^2={b^2-4ac\over 4a^2}

11: \sqrt{\left(x+{b\over 2a}\right)^2}=\pm\sqrt{{b^2-4ac\over 4a^2}}

12: x+{b\over 2a}=\pm\sqrt{{b^2-4ac\over 4a^2}}

13: x=-{b\over 2a}\pm\sqrt{{b^2-4ac\over 4a^2}}

14: x=-{b\over 2a}\pm{\sqrt{b^2-4ac}\over 2a}

15: x={-b\pm\sqrt{b^2-4ac}\over 2a}
-----------------------------
Formula:

One by one (fifteen), we are going to introduce the indexes. This will create a folder called CSV in FORMULAS/<TXT_NAME>/CSV/ (FORMULAS/QUADRATIC/CSV/ in our example) which will contain the csv files that we will need in the next step. With the help of the images that we exported previously, at the end of each formula it will generate a .csv file with the number of the corresponding formula.

The way to use this program is as shown in the following tutorial: