Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This was the error message I received in codio message from the terminal Collapse 3. The Pilot Functions 14. Implement get_certifi... Whenever a student flies,

imageimage
This was the error message I received in codio
image

message from the terminal

Collapse 3. The Pilot Functions 14. Implement get_certifi... Whenever a student flies, we want to know what certifications that student holds at the time of that flight. If the student flies by himself or herself after having soloed, that is okay. But a solo flight before the official solo date is very bad. This is the purpose of the function get_certification. Its arguments are a student (a single row in students.csv) and a takeoff time (a datetime object with a time zone). It returns the certification of that student at the time of takeoff. These certifications are indicated by one of the following variables defined in pilots.py: PILOT_INVALID (A pilot that is not even in the school) PILOT_NOVICE (A pilot that has joined the school but has not soloed) PILOT_STUDENT (A pilot that has soloed but does not have a license) PILOT_CERTIFIED (A pilot that has a license but has under 50 hours) PILOT_50_HOURS (A pilot with 50 hours post license) The function get_certification should return one of the values above. Implement this E 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 172 734 75 76 77 78 import utils # 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): Returns the certification classification for this student at the time of takeoff. The certification is represented by an int, and must be the value PILOT_NOVICE, PILOT STUDENT, PILOT_CERTIFIED, PILOT_50_HOURS, or PILOT_INVALID. It is PILOT_50_HOURS if the student has certified '50 Hours' before this flight takeoff. It is PILOT CERTIFIED if the student has a private license before this takeoff and PILOT STUDENT if the student has soloed before this takeoff. A pilot that has only just joined the school is PILOT_NOVICE. If the flight takes place before the student has even joined the school, the result is PILOT_INVALID. Recall that a student is a 10-element list of strings. The first three elements are the student's identifier, last name, and first name. The remaining elements are all timestamps indicating the following in order: time joining the school, time of first solo, time of private license, time of 50 hours certification, time of instrument rating, time of advanced endorsement, and time of multiengine endorsement. Parameter takeoff: The takeoff time of this flight KA

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Elementary Statistics

Authors: Robert R. Johnson, Patricia J. Kuby

11th Edition

978-053873350, 9781133169321, 538733500, 1133169325, 978-0538733502

More Books

Students also viewed these Programming questions

Question

11. What kind of words are Brocas patients least likely to use?

Answered: 1 week ago