- The questions in these tasks can be solved using mathematical equations, utilizing pre-built functions in Python. These tasks are straightforward and have been solved using the task1.dot file.
- The questions in these tasks can be solved using mathematical equations, utilizing pre-built functions in Python. These tasks are straightforward and have been solved using the task1.dot file.
##### From task 1.9 and onwards
##### From task 1.9 and onwards
- Explanation 1
- Explanation 1
In this task, the data is structured in the following way:
In this task, the data is structured in the following way:
['A','B','C'],
['A','B','C'],
['1','2','3'],
['1','2','3'],
['4','5','6'],
['4','5','6'],
and so on...
and so on...
As a result, the variable 'ListOfData' will have data in the following shape: [['A','1','4'..],[['B','2','5'..]]..]
As a result, the variable 'ListOfData' will have data in the following shape: [['A','1','4'..],[['B','2','5'..]]..]
- Explanation 2
- Explanation 2
A for loop is created to access every single data element in 'ListOfData', ranging from 0 to 769 (or 768 if we start counting from 0). The loop starts at [0][0] and continues to [768][0], then moves on to [0][1] and so on until it reaches the last data element at [768][8]. As the loop progresses, the data is appended to a new list called 'ListOfData', as explained in Explanation 1.
A for loop is created to access every single data element in 'ListOfData', ranging from 0 to 769 (or 768 if we start counting from 0). The loop starts at [0][0] and continues to [768][0], then moves on to [0][1] and so on until it reaches the last data element at [768][8]. As the loop progresses, the data is appended to a new list called 'ListOfData', as explained in Explanation 1.
### 2) Strength
### 2) Strength
- Some of the functions can be reused in different phases, and the tasks are interconnected, allowing results from one task to be used in another without the need to rewrite the entire code.
- Some of the functions can be reused in different phases, and the tasks are interconnected, allowing results from one task to be used in another without the need to rewrite the entire code.
### 3) Weaknesses
### 3) Weaknesses
- One weakness of the code is that it heavily relies on pre-built Python functions and does not make use of libraries such as CSV and Pandas, which could potentially make the code shorter and more efficient.
- One weakness of the code is that it heavily relies on pre-built Python functions and does not make use of libraries such as CSV and Pandas, which could potentially make the code shorter and more efficient.
### 4) Improvement Points
### 4) Improvement Points
- Any Python program can be improved and written in fewer lines. The custom table can be improved and created with a more efficient algorithm and better formatting. The tasks from 1.1 to 1.7 can be updated to be solved using pure Python, without the use of pre-built functions.
- Any Python program can be improved and written in fewer lines. The custom table can be improved and created with a more efficient algorithm and better formatting. The tasks from 1.1 to 1.7 can be updated to be solved using pure Python, without the use of pre-built functions.
### 5) Alternative
### 5) Alternative
- Some of the mathematical equations, such as standard deviation, can be solved using alternative equations. Instead of using pre-built functions such as 'sum' and 'len', a for loop can be used to achieve the same result. The custom table can also be created using different shapes, such as (+) or (dots) instead of (*).
- Some of the mathematical equations, such as standard deviation, can be solved using alternative equations. Instead of using pre-built functions such as 'sum' and 'len', a for loop can be used to achieve the same result. The custom table can also be created using different shapes, such as (+) or (dots) instead of (*).
### 6) Algorithm (FR.1.10 to 1.12)
### 6) Algorithm (FR.1.10 to 1.12)
- The first function, read_csv_column, reads in a CSV file and stores the data in a dictionary with the column names as keys and the column values as values. The second function, statisticsTable, takes in the dictionary from the first function and calculates various statistical measures (mean, standard deviation, minimum, maximum, 25th percentile, 50th percentile, and 75th percentile) for each column. The third function, CustomStatisticsTable, takes in the dictionary from the second function and generates a table of the statistical measures with each column aligned and separated by a specified character. The fourth function, meanFinder, calculates the mean of a list of numerical values. The fifth function, StdDevFinder, calculates the standard deviation of a list of numerical values. The sixth function, MinFinder, finds the minimum value in a list of numerical values. The seventh function, MaxFinder, finds the maximum value in a list of numerical values. The eighth function, percentileFinder, calculates the specified percentile of a list of numerical values.
- The first function, read_csv_column, reads in a CSV file and stores the data in a dictionary with the column names as keys and the column values as values. The second function, statisticsTable, takes in the dictionary from the first function and calculates various statistical measures (mean, standard deviation, minimum, maximum, 25th percentile, 50th percentile, and 75th percentile) for each column. The third function, CustomStatisticsTable, takes in the dictionary from the second function and generates a table of the statistical measures with each column aligned and separated by a specified character. The fourth function, meanFinder, calculates the mean of a list of numerical values. The fifth function, StdDevFinder, calculates the standard deviation of a list of numerical values. The sixth function, MinFinder, finds the minimum value in a list of numerical values. The seventh function, MaxFinder, finds the maximum value in a list of numerical values. The eighth function, percentileFinder, calculates the specified percentile of a list of numerical values.