Question: PYTHON ONLY Background: You are working for the Ministry of Transportation in Ontario. You are asked to create a program that checks people's eligibility to
PYTHON ONLY


Background: You are working for the Ministry of Transportation in Ontario. You are asked to create a program that checks people's eligibility to take road tests. To be allowed to take a "G" class road test, the person must: - have a "G2" license for at least 24 months To be allowed to take a "G2" class road test, the person must: - have a "G1" license for at least 12 months This challenge has 2 parts: Part 1 Elibility Check Write a function that determines someone's eligibility to take a road test for a given class following the criteria described in the scenario. 1. Receive 3 arguments: - current_class: a String value with current driving class - a Integer value representing the number of months the person has held their current class - : a String value with the road test class they want to test their eligibility for 2. Check using the and matches the criteria of the to be eligible. 3. Returns a Boolean value - if eligible - if not eligible 4. Your solution MUST employ the "flag" technique to determine the eligibility. Also, please provide 5 extra test cases like the ones shown: ]: \# Your solution ]: \# Test Cases - uncomment to run \# print(isEligible("G", 12, "G")) \#expected False \# print(isEligible("G1", 12, "G2")) \#expected True \# print(isEligible("G", 28, "G")) \#expected False \# print(isEligible("G2", 28, "G")) \#expected True \# print(isEligible("G2", 32, "G1")) \#expected False \# print(isEligible("G", 25, "G1")) \#expected False \# your test cases
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
