Iegal_passengers: (int, int, str) -> int In Ontario, a car may legally only carr
ID: 3651506 • Letter: I
Question
Iegal_passengers: (int, int, str) -> int 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 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.Explanation / Answer
well its not hard python has a function called Random you can do the following to get a random word >> import random ## Importing The Random Function Word_List = ['poney','submarine','bird','chocolate'] ## Giving a list of words print random.choice(Word_List) ## Printing one of the word_list Randomly and now to print the words and scramble it you can do>> import random word = raw_input('Word: ') ## asking the user for the word print ''.join(random.sample(word, len(word))) ## Mixing it UP :D
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.