Please consider offering answers and suggestions to help other students!
And if you fix a problem by following a suggestion here,
it would be great if other interested students could see a short
"Great, fixed it!" followup message.
In the lab it is specified when two runs have the same time that they should be 'tie-broken by runner name.' I'm having trouble with this, originally i thought it meant in Lexicographical order but my code keeps failing particularly when runs have the same time and first letter but differ in capitalization so how exactly should it be treated i.e
for the list[c,b,B,C,A,a]
should they be sorted:
[A,C,abc] or [a,A,b,c,C]
I have tried to implement the second version for hours but when i do more failure is added.
You're overcomplicating it, it's just whichever is less in Name1 < Name2 form comes first, which follows the encoding values where capitals come before lowercase letters.
Apple < apple, Bpple < apple, and apple < bpple as well ass Apple < Bpple.
is your code passing because my code 100% does this but it is asking for a different order:
e,g
Traceback (most recent call last):
File "C:\Users\takud\OneDrive\Desktop\lab2\test_speedrunning.py", line 99, in test_submit_run
self.assertEqual(received, expected)
AssertionError: Lists differ: [(0, [132 chars](4, 'gzgIeNPC'), (4, 'GS3XJxrT'), (4, 'RtzeUV9[6003 chars]4k')] != [(0, [132 chars](4, 'GS3XJxrT'), (4, 'RtzeUV9t'), (4, 'gzgIeNP[6003 chars]4k')]
First differing element 8:
(4, 'gzgIeNPC')
(4, 'GS3XJxrT')
yeah i'm having the same issue with mine. extremely confused as i've tried all logical variations, and tested with my own list of runs, but when it comes to the unit testing it fails. not able to make it to the lab today to get help unfortunately so some guidance here would be appreciated :)
FAIL: test_submit_run (__main__.TestSpeedrunning)
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\Users\keans\OneDrive\cs_and_ds\2024\CITS2200\labs\lab_2\test_speedrunning.py", line 98, in test_submit_run
self.assertEqual(received, expected)
AssertionError: Lists differ: [(0, 'yP6pTfe2'), (0, 'yP6pTfe2'), (0, 'ojJGyob[9232 chars]jU')] != [(0, '5SEKKtm0'), (0, 'ojJGyob5'), (0, 'ojJGyob[9232 chars]4k')]
First differing element 0:
(0, 'yP6pTfe2')
(0, '5SEKKtm0')