I have a program that generates 10 random questions and it all works fine, i got it to create text files in the location the file is run from, what i need is a way to sort them from highest score to lowest score, although i would not like to post my code i will upon request, i know a couple possible ways but i have nowhere to start so i would like a way to sort the text file however i have not yet found a way to check if the users score is higher or lower than the rest and place their name above the previous one.

The deadline for this program is very soon and i need a really smart person to help me but i would not like anything alone the lines of “you need to do/implement <module/thing>” i mean something along the lines of “intergrate into it and it will work” or something similar, thanks for reading this and thanks even more if you have taken the time to answer, i know this is the harder end of python.

also if anyone knows how to turn a user pressing the enter button into a variable so i can exclude it from the list of wright answers i would be most appreceative, i have tried “”, thanks

  • Ben

Hello, @cloudjumper36761!
Have you ever opened a file with Python and played with it abit?
I mean, have you checked if the first line of the text starts with a specific name or letter?
Have you ever tried to, somehow, get each line and check if “SOMETHING” (I’m truly holding my self to not actually tell you) is there and that you can use to compare?

Also, there MANY sorting algorithms, just try to use the one you understand better and can possibly explan if there’s a need.

Quote me if there’s anything else I can help you with!

Best regards,