This was the error message I received in codio message from the terminal Collapse 3. The Pilot
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
What are the conditions for the steady-state distribution to exist? [4 marks] (c) Describe the M/M/1 queue and give a stochastic model for the number of customers present. Find the steady-state...
-
Use your results from question 16 to construct a cumulative frequency table. Use the goaltenders salaries for the 1991 NHL season given in the following table to answer question. Question 16 Group...
-
Ratio analysis can provide both internal and external users with a tremendous amount of information about firm performance. Select a publicly traded firm. Conduct a ratio analysis of the firm and...
-
A refrigerator uses refrigerant-134a as the working fluid and operates on the ideal vapor-compression refrigeration cycle except for the compression process. The refrigerant enters the evaporator at...
-
TMP Human Resource Consulting had the following contribution margin income statement for the year ended 2025. Required Answer each of the following independent situations. (a) Explain how an...
-
Of the 217 airports available for public use in Belgium, 132 are paved. For a simple random sample of n = 50, what is the probability that at least 22 of the airports in the sample will be paved?
-
A projectile is launched horizontally at A with a speed vo. The time Right is 10 sec. and the path of the projectile at B is inclined at 20 with the horizontal a. b. Determine the range x Determine...
-
Journalize all these transactions into a general ledger. Transactions May 1 Purchased merchandise from Keys Wholesale on account for $735.30, Invoice No 91 Dated May 1, terms 2/10, n30 May 2...
-
How would management accounting be useful to a gym? Explain your answer giving appropriate examples. Explain the concept 'value chain'. Why is the concept of value chain important to an organization...
-
The company was organized on January 3, 20XE. The firm was authorized to issue 1,000,000,000 shares of $1.00 par common stock. During 20XE, the company had the following transactions relating to...
-
The company's management is considering either a 100% stock dividend or a 2-for-1 stock split. Complete the following chart to assist in answering the following: Before Common stock, $0.40 par value...
-
, write out summation and simplify the result.
-
Mr . S . Krishna received a gift of a house in Nov. 2 0 0 7 from Mr . K . Hegde who had purchased it in Nov. 1 9 9 7 for 6 , 3 0 , 0 0 0 . Mr . K . Hegde renovated the house in March 1 9 9 8 at a...
-
Vernon Corporation manufactures model airplanes. The company purchased for $157,000 automated production equipment that can make the model parts. The equipment has a $13,000 salvage value and a...
-
Which of the following elements will have the lowest first ionization energy? O a. a. 20Ca O b. 165 O . 19K O d. g0
-
5. Convert the following ERD to a relational model. SEATING RTABLE Seating ID Nbr of Guests Start TimeDate End TimeDate RTable Nbr RTable Nbr of Seats RTable Rating Uses EMPLOYEE Employee ID Emp...
-
Find the following critical values for F from Tables 9A, 9B, and 9C in Appendix B. a. F(24, 12, 0.05) e. F(15, 18, 0.025) b. F(30, 40, 0.01) f. F(15, 9, 0.025) c. F(12, 10, 0.05) g. F(40, 30, 0.05)...
-
The perfect age graphic shows the results from a 9 Ã 2 contingency table for one qualitative and one quantitative variable. a. Identify the population and name the qualitative and quantitative...
-
The following are 24 consecutive downtimes (in minutes) of a particular machine. The null hypothesis of randomness is to be tested against the alternative that there is a trend. A MINITAB analysis of...
-
If two countries had identical term structures of interest rates, what is the expected future exchange rate change between the two currencies?
-
Pick three developing countries and create a country risk index for them. Rank them ordinally in terms of factors that you can observe (exports, GDP growth, reserves, etc.) by looking at...
-
Give examples of policies that a country could implement to reduce its absorption.
Study smarter with the SolutionInn App