代做COMP 636: Python Assessment

COMP 636: Python Assessment
Due: 5pm Monday 28 August 2023 Worth 40% of COMP636 grade Submit via Akoraka | Learn
Introduction
The Bankside-Rakaia Motorkhana Mavens (BRMM) car club has asked for a system to help manage its August ‘Have-a-go Fun Motorkhana’ event. You are provided with an outline of the code for the system to complete.
Motorkhana is a type of motorsport where the aim is to drive around a course made of cones as fast as possible without hitting any cones or going the wrong way.
Drivers in a motorkhana compete individually, on asphalt or on grass. Each attempt (‘run’) consists of driving around cones, in a particular order (a ‘course’), and is timed (see this video).
Drivers must memorise a course map (such as Figure 1), then drive the course without hitting any cones. Usually there are 10-20 cones on a course. The winner is the driver with the lowest (fastest) combined times for their runs around the course.


The data provided with this assessment is from the August BRMM ‘fun’ event. In this event each driver has 3 runs around a course – one run on Course A, one on Course B and one on Course C. Each run has a time recorded. If a driver hits a cone, 5 seconds is added to the driver’s time for each cone hit. 10
Figure 1: Northland Car Club motorkhana course, www.ncc.org.nz/mk tests.htm

seconds is added if the driver goes the wrong way around the map (‘WD’, wrong direction).
For example, in the data, Run 9 is Driver 32 (Hank Barnard) on Course A. He drives the course in
46.22 seconds, but he hits 2 cones and takes a wrong direction. His run total time is therefore 66.22 seconds (46.22 + 5 + 5 + 10):
For each driver, the best 2 times from their 3 runs are added together. The winner is the driver with the shortest total time from their best 2 runs. Any driver who completes only two runs has the missing run time ignored. For drivers with less than 2 runs (e.g., Kiri Smith), the result ‘HAG’ (Had A Go) shows on the overall results instead of a time result.
For example, Hank Barnard’s three run totals are 66.22, 47.3 and 63.35 seconds. His result for the day will be his best two, i.e., 47.3 + 63.35 = 110.65 seconds. Luke Cooper did not attempt course B (run 17, no time recorded), so his best two are his course A and C run totals.
Some registered drivers do not have any runs recorded (e.g., 111 Andy Capp, 225 Sonja Pickles). They should show as ‘HAG’ in the overall results.
Junior drivers (category ‘J’) are aged 12-19. Junior drivers aged 12-16 must also have a designated adult caregiver driver (another driver at the event who isn’t a junior) registered in the driver list.

Some of the runs have not had their results entered yet for time, number of cones hit and wrong direction (WD), e.g., Driver 220 Andy Pickles did record 3 run times (run numbers 11, 22, 31), but they have not been entered in the provided data file yet. You can use those blank runs for testing your Add/Update Run Data menu option (see below).
Remember that we may use a different set of drivers and runs for marking in brmm_data.py with different data but the same structure. So do not hard-code values (such as run 11 or 22, or which times are missing in particular runs, etc.) because we may mark with different drivers and runs.
File Download:
Download the following files from the COMP636 Assessment block on Akoraka | Learn:
-brmm_admin_your_name.py – This is the initial code to begin from.
Include your own name in the filename (e.g., brmm_admin_Anna_Lee.py), and your name and student ID in a comment at the start of the file. Do not change the menu numbering or existing function names, although you may add new functions of your own.
-brmm_data.py – The driver and run data. Do not change the structure of this data (col_drivers, etc). Although you may add extra drivers and runs to db_drivers and dbRuns, that is not necessary. We will use our own copy of brmm_data when marking, with different driver and run data, but with the same col_drivers, db_drivers, col_runs, db_runs structure as provided.

Requirements
The system needs to keep a record of drivers, their run results for each course, and the overall results for the day, as well as recording juniors and their nominated parent or caregiver, if appropriate.
-Drivers are stored as a dictionary of key:value pairs. Each key is the driver ID. Each value part contains a tuple (First Name, Surname, Category, Age, Caregiver). Category is ‘J’ for any junior drivers. Drivers who are not juniors do not have an age recorded. Caregiver is the driver ID of an adult driver in the list (for drivers aged 12-16).
-Runs are stored as a dictionary of key:value pairs. Each key is a run ID. Each value part contains a tuple (Course, Driver, Time, Cones, WD). Driver is a driver ID. Time is recorded to the nearest 0.01 of a second. Cones contains the number of cones hit, if any. WD (wrong direction) is either 1 (went the wrong direction around one or more cones) or 0 (no wrong direction).
-Missing data values are recorded as None.
-One function (list_drivers) for menu option 1 has already been provided for you. This lists all of the drivers and displays Driver ID, First Name, Last Name and Age.
-You must use the provided column_output function for all on-screen display of data (except for the graph of cones hit). You will need to convert your dictionary data into the correct format for this function (the list_drivers function gives an example of how to do this). Do not modify this function.
-Validate all user input appropriately. If data of the wrong type is entered by the user, this should be captured without causing the program to crash or any other type of error. Also ensure that only valid values that make sense can be entered.
Tasks
50 marks available in total.
Add the following features to the system: (Marks shown are an indication and may change a little.)
1.Menu enhancement (1 mark): Modify the code so that the user can enter an upper- or
lower-case X (i.e., X or x) to exit the program.
2.Junior driver list (5 marks): List the junior drivers, in order of increasing age. Combine their full names (first name and surname) in one column (e.g., ‘Kiri Smith’, not ‘Kiri’ ‘Smith’). For juniors aged 12-16, display their caregiver’s full name, not the caregiver’s driver ID.
3.List results of runs (8 marks): List the run results. For each run, include the time, cones hit and WD status, and then the calculated Run Total time. Ensure your list shows all Course A runs first, then B then C, ordered from best to worst Run Total for each course.
4.Enter or update run data (15 marks): First display the run results (from Task 3 above), then allow the user to add or update the times, cones hit and WD, for the existing runs. Ask the user for the ID of the run you want to update and check that the run ID exists. The user can enter the number of cones hit, but 0 is entered automatically if no value is entered. Ensure the time and number of cones is in a sensible range. The user types in ‘wd’ to enter a wrong direction (in upper or lower case), otherwise no value for WD should default to 0. After updating a run, a user has the option to update another run or return to the menu. (Note: Your code does not need to add new runs – it just updates existing runs. You can assume that all of the runs are already in the system.)
5.Display overall results (8 marks): Calculate and display the overall results for the August ‘Have a Go’. For each driver show the sum of their best two runs. Show results from best to worst, with any "HAG" results at the bottom of the list. Show each driver’s full name in one column and show ‘(J)’ after the name for junior drivers (e.g., ‘Edward Cooper (J)’).
6.Cone graph (8 marks): Display a graph of the number of cones hit by each driver. Exclude drivers who did not hit any cones. Choose any symbol or character (e.g., Δ, C, ) to represent each cone hit, with a space between each symbol or character. For example, using σ as a symbol (you will use a better headings and a better symbol than this!):

Additional notes:
-The quality of the user experience will be taken into account, for each of the tasks above.
Full marks for any item will require validation of data entered (for data type and sensible values) and details in the interface that demonstrate some consideration of what would work well for the user (within the limitations of the terminal window output in VS Code).
-The provided brmm_admin_your_name.py Python file contains a menu structure and partially completed functions. These must not be deleted or renamed, but you may add arguments/parameters to these functions. You may also add additional functions of your own. Remember to rename the file to include your name.
-You are expected to apply problem solving skills to practically solve issues as they arise.

-You must add comments to your code. These do not need to be on every line of code but should be written to be enough detail so that if you came back to the code in 12 months’ time that you could quickly work out what the code is doing. The existing list_drivers function gives an example of the level of commenting that is expected.

Submission:
Submit (upload) only your main Python .py file for marking: brmm_admin_your_name.py. Do not include the brmm_data.py file.
-Submit your file via the submission link on the COMP636 Assessment page.

Important note


Indicative mark allocation
(This indicates where to spend your time but the marks for each part change a little when marking.)
50 marks available in total:

Item Marks available
Menu enhancement 1
Junior list 8
Results for all runs 10
Add/update run 15
Overall results 8
Cones Graph 8
TOTAL 50

热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图