Question: def list _ weather _ violations ( directory ) : Returns the ( annotated ) list of flight reservations that violate weather
def listweatherviolationsdirectory:
Returns the annotated list of flight reservations that violate weather minimums.
This function reads the data files in the given directory the data files are all
identified by the constants defined above in this module It loops through the
list of flight lessons in lessons.csv identifying those takeoffs for which
getweatherviolation is not the empty string.
This function returns a list that contains a copy of each violating lesson, together
with the violation appended to the lesson.
Example: Suppose that the lessons
SQR IT:::T::: VFR Pattern
SQR IT:::T::: VFR Pattern
SJQ IT:::T::: VFR Pattern
violate for reasons of 'Winds', 'Visibility', and 'Ceiling', respectively and are the
only violations Then this function will return the d list
SQR IT:::T::: VFR Pattern, Winds
SQR IT:::T::: VFR Pattern, Visibility
SJQ IT:::T::: VFR Pattern, Ceiling
REMEMBER: VFR flights are subject to minimums with VMC in the row while IFR flights
are subject to minimums with IMC in the row. The examples above are all VFR flights.
If we changed the second lesson to
SQR IT:::T::: IFR, Pattern
then it is possible it is no longer a visibility violation because it is subject to
a different set of minimums.
Parameter directory: The directory of files to audit
Precondition: directory is the name of a directory containing the files 'daycycle.json',
'weather.json', 'minimums.csv 'students.csv and 'lessons.csv
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
