Question: def read _ csv ( filename ) : Parameter filename: The file to read Precondition: filename is a string, referring to a

def read_csv(filename):
"""
Parameter filename: The file to read
Precondition: filename is a string, referring to a file that exists, and that file
is a valid CSV file
"""
pass
def write_csv(data,filename):
"""
Parameter data: The Python value to encode as a CSV file
Precondition: data is a 2-dimensional list of strings
Parameter filename: The file to read
Precondition: filename is a string representing a path to a file with extension
.csv or .CSV. The file may or may not exist.
"""
pass
def read_json(filename):
"""
Parameter filename: The file to read
Precondition: filename is a string, referring to a file that exists, and that file
is a valid JSON file
"""
pass
def str_to_time(timestamp,tzsource=None):
"""
Parameter timestamp: The time stamp to convert
Precondition: timestamp is a string
Parameter tzsource: The time zone to use (OPTIONAL)
Precondition: tzsource is either None, a string naming a valid time zone,
or a datetime object.
"""
pass
def daytime(time,daycycle):
"""
Parameter time: The time to check
Precondition: time is a datetime object
Parameter daycycle: The daycycle dictionary
Precondition: daycycle is a valid daycycle dictionary, as described above
"""
pass
def get_for_id(id,table):
"""
Parameter id: The id of the student or instructor
Precondition: id is a string
Parameter table: The 2-dimensional table of data
Precondition: table is a non-empty 2-dimension list of strings
"""
pass
def get_certification(takeoff,student):
"""
Parameter takeoff: The takeoff time of this flight
Precondition: takeoff is a datetime object with a time zone
Parameter student: The student pilot
Precondition: student is 10-element list of strings representing a pilot
"""
pass
def get_best_value(data, index, maximum=True):
"""
Parameter data: a 2-dimensional nested list of data
Precondition: the column referenced by index should by numbers in string format
Parameter index: position to examine in each row of data
Precondition: index is a an integer
Parameter maximum: indicates whether to return the highest value (True) or
lowest value (False)
Precondition: maximum is a boolean and defaults to True
"""
pass
def get_minimums(cert, area, instructed, vfr, daytime, minimums):
"""
Parameter cert: The pilot certification
Precondition: cert is an int and one of PILOT_NOVICE, PILOT_STUDENT, PILOT_CERTIFIED,
PILOT_50_HOURS, or PILOT_INVALID.
Parameter area: The flight area for this flight plan
Precondition: area is a string and one of 'Pattern', 'Practice Area' or 'Cross Country'
Parameter instructed: Whether an instructor is present
Precondition: instructed is a boolean
Parameter vfr: Whether the pilot has filed this as an VFR flight
Precondition: vfr is a boolean
Parameter daytime: Whether this flight is during the day
Precondition: daytime is boolean
Parameter minimums: The table of allowed minimums
Precondition: minimums is a 2d-list (table) as described above, including header
"""
pass
def bad_visibility(visibility,minimum):
"""
Parameter visibility: The visibility information
Precondition: visibility is a valid visibility measurement, as described above.
(e.g. either a dictionary or the string 'unavailable')
Parameter minimum: The minimum allowed visibility (in statute miles)
Precondition: minimum is a float or int
"""
pass
def bad_winds(winds,maxwind,maxcross):
"""
Parameter winds: The wind speed information
Precondition: winds is a valid wind measurement, as described above.
(e.g. either a dictionary, the string 'calm', or the string 'unavailable')
Parameter maxwind: The maximum allowable wind speed (in knots)
Precondition: maxwind is a float or int
Parameter maxcross: The maximum allowable crosswind speed (in knots)
Precondition: maxcross is a float or int
"""
pass
def bad_ceiling(ceiling,minimum):
"""
Parameter ceiling: The ceiling information
Precondition: ceiling is a valid ceiling measurement, as described above.
(e.g. either a dictionary, the string 'clear', or the string 'unavailable')
Parameter minimum: The minimum allowed ceiling (in feet)
Precondition: minimum is a float or int
"""
pass
def get_weather_report(takeoff,weather):
"""
Parameter takeoff: The takeoff time
Precondition: takeoff is a datetime object
Paramater weather: The weather report dictionary
Precondition: weather i

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!