It's UWAweek 47

help2200

This forum is provided to promote discussion amongst students enrolled in CITS2200 Data Structures and Algorithms.

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.

How do I ask a good question?
Displaying the 4 articles in this topic
Showing 4 of 176 articles.
Currently 7 other people reading this forum.


 UWA week 13 (1st semester, week 5) ↓
SVG not supported

Login to reply

👍?
helpful
6:40pm Tue 26th Mar, ANONYMOUS

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.


SVG not supported

Login to reply

👍?
helpful
9:27pm Tue 26th Mar, William R.

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.


SVG not supported

Login to reply

👍?
helpful
8:07am Wed 27th Mar, ANONYMOUS

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')


SVG not supported

Login to reply

👍?
helpful
10:58am Wed 27th Mar, ANONYMOUS

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')

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy