You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

example1.py 973B

1234567891011121314151617181920212223242526272829
  1. #import csv
  2. #with open('test1.txt','r') as f:
  3. # # Printing Specific Part of CSV_file
  4. # # Printing last line of second column
  5. # lines = list(csv.reader(f, delimiter = ',', skipinitialspace = True))
  6. # #print(lines[1][4])
  7. # # For printing a range of rows except 10 last rows of second column
  8. # for i in range(len(lines)-3):
  9. # print(lines[i][4])
  10. import numpy as np
  11. AoA_point_3 = -90
  12. a = np.array([])
  13. def get_data(filename):
  14. import csv
  15. with open(filename,'r') as f:
  16. lines = list(csv.reader(f, delimiter = ',', skipinitialspace = True)) # Printing Specific Part of CSV_file
  17. #print(lines[0][4]) # Printing last line of second column
  18. for i in range(len(lines)-5): # For printing a range of rows except 10 last rows of second column
  19. #print(lines[i][4]) # Print the 4th column of every row except last 3 rows
  20. C = int(lines[i][4])
  21. if C != AoA_point_3:
  22. Angle_diff = C - AoA_point_3
  23. print(Angle_diff)
  24. get_data('test2.txt')