I want to ask the user to send a txt file for evaluation, then I need to set up the table and calculate certain things (max, min, sum, etc.) where I am at a dead end - how to set up the table, I am to print and how to find the maximum , minimum and amount based on column specifications.
my code is still ----
def main():
my_list = [[float(i) for i in line.split(',')] for line in open("Alpha.txt")]
print(my_list)
my_list_one = my_list[0]
my_list_two = my_list[1]
my_list_three = my_list[2]
my_list_four = my_list[3]
main()
All this is done, the Alpha.txt file is read and splits the data lines into separate lists. What I am trying to do is put them in a table like this ...
-----------------------------------------------
| | A | B | C | D | E |
-----------------------------------------------
| 1 | 5.00 | 2.00 | 6.00 | 4.00 | 5.00 |
| 2 | 3.00 | 7.00 | 8.00 | 7.00 | 9.00 |
| 3 | 1.10 | 2.20 | 5.80 | 0.10 | 1.30 |
-----------------------------------------------
to format the table, I would just use basic row formatting, e.g.
my_str = "| {:>12.10f} | {:^3d} | {:>12d} |".format(10**(-i), i, 10**i)
, , , lette, ex A, min 5,00, 3,00 1,00, if else .
!
[[1.2, 4.3, 7.0, 0.0], [3.0, 5.0, 8.2, 9.0], [4.0, 3.0, 8.0, 5.6], [8.0, 4.0, 3.0, 7.4]]