1. In this quiz, you are going to “fill in the blanks” for codes that you think are appropriate.
1. In this quiz, you are going to “fill in the blanks” for codes that you think are appropriate.
2. The following codes are written to automatically match Uber/Lyft drivers to riders requesting a ride.
3. Setting: You are an Uber driver. There are currently 100 riders requesting a ride. You want to pick up riders that meet the following two conditions:
Condition 1: Ride time that each rider requests spans 5-50 mins (the ride time is random)
Condition 2: I prefer riders with the rider time between 5 and 15 mins.
Condition 3: after all the matches, print a statement counting the total number of matched rides.
5. After filling out the blanks, the output statement should look as follows:
[O] No. 1 rider (ride time: 8 mins)
[ ] No. 2 rider (ride time: 16 mins)
[ ] No. 3 rider (ride time: 38 mins)
…
[ ] No. 99 rider (ride time: 21 mins)
[O] No. 100 rider (ride time: 10 mins)
Total riders matched: 2
6. Once you complete codes, save and name the file as “Lastname_Firstname
Suggestions
1. First, you will create 100 riders.
2. Second, you will create the rider time (5-50 mins) for each rider (random function).
3. Third, if the rider time matches my conditions, print statement and increase the count. Otherwise (“else”) print another statement indicating not matched.
4. Make sure that you write codes in detail so that anyone without Python background can run your codes by copying and pasting onto Visual Studio Codes. For example, if a package is required to run your code, you are to include the codes that import necessary packages. If directions/instructions are required when running your codes, include the directions/instructions hashed out.
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.
