Question: # CERTIFICATION CLASSIFICATIONS # The certification of this pilot is unknown PILOT _ INVALID = - 1 # A pilot that has joined the school,

# CERTIFICATION CLASSIFICATIONS
# The certification of this pilot is unknown
PILOT_INVALID =-1
# A pilot that has joined the school, but has not soloed
PILOT_NOVICE =0
# A pilot that has soloed but does not have a license
PILOT_STUDENT =1
# A pilot that has a license, but has under 50 hours post license
PILOT_CERTIFIED =2
# A pilot that 50 hours post license
PILOT_50_HOURS =3
def get_certification(takeoff,student):
pass
def get_best_value(data, index, maximum=True):
pass
def get_minimums(cert, area, instructed, vfr, daytime, minimums):
pass
def read_csv(filename):
pass
def write_csv(data,filename):
pass
def read_json(filename):
pass
def str_to_time(timestamp,tzsource=None):
pass
def daytime(time,daycycle):
pass
def get_for_id(id,table):
pass
def bad_visibility(visibility,minimum):
pass
def bad_winds(winds,maxwind,maxcross):
pass
def bad_ceiling(ceiling,minimum):
pass
def get_weather_report(takeoff,weather):
pass
def get_weather_violation(weather,minimums):
pass
# FILES TO AUDIT
# Sunrise and sunset
DAYCYCLE = 'daycycle.json'
# Hourly weather observations
WEATHER = 'weather.json'
# The list of insurance-mandated minimums
MINIMUMS = 'minimums.csv'
# The list of all registered students in the flight school
STUDENTS = 'students.csv'
# The list of all take-offs (and landings)
LESSONS = 'lessons.csv'
def list_weather_violations(directory):
"""
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
get_weather_violation() 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
S00687548QR I0612017-01-08T14:00:00-05:002017-01-08T16:00:00-05:00 VFR Pattern
S00758548QR I0722017-01-08T09:00:00-05:002017-01-08T11:00:00-05:00 VFR Pattern
S00971426JQ I0722017-01-12T13:00:00-05:002017-01-12T15:00:00-05:00 VFR Pattern
violate for reasons of 'Winds', 'Visibility', and 'Ceiling', respectively (and are the
only violations). Then this function will return the 2d list
[[S00687,548QR, I061,2017-01-08T14:00:00-05:00,2017-01-08T16:00:00-05:00, VFR, Pattern, Winds],
[S00758,548QR, I072,2017-01-08T09:00:00-05:00,2017-01-08T11:00:00-05:00, VFR, Pattern, Visibility],
[S00971,426JQ, I072,2017-01-12T13:00:00-05:00,2017-01-12T15:00:00-05:00, 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
S00758,548QR, I072,2017-01-08T09:00:00-05:00,2017-01-08T11:00:00-05:00, 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!