Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 8 Online
OpenStudy (anonymous):

Problem: In Ontario, a car may legally only carry as many people as there are working seat belts. Drivers with class 'G2' licences have extra night-time restrictions (between midnight and 5am). Initially, they can carry only one passenger age 19 and under. After they have had a license for at least 6 months, 'G2' drivers can carry up to 3 passengers age 19 and under. A 'G' licence doesn't have these extra night time restrictions. The first parameter is the number of working seat belts, the second is the number of months this driver has held this class of license, and the third is the class of

OpenStudy (anonymous):

the class of license (either 'G' or 'G2'). Return the maximum number of legal night-time passengers age 19 and under (not counting the driver) for this driver and vehicle.

OpenStudy (anonymous):

legal_passengers: (int, int, str) -> int

OpenStudy (anonymous):

does anybody know how i could do this question?

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!