Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Jay Harper-Harrison
1,044 PointsSchool assignment
The teacher wants to use the results from students taking these quizzes to log their performance. The
system should store the last three scores for each student. The teacher would like to be able to output
the results of the quiz for a particular class, sorted:
• in alphabetical order with each student’s highest score for the tests
• by the highest score, highest to lowest
• by the average score, highest to lowest.
Analyse the requirements in detail for this program and design, code, test and evaluate a program that
will allow the teacher to select which class group to look at and which field to use when sorting the
output data.
How would I do this, any help?
3 Answers
ivomiranda
30,286 PointsYou have no idea where to start? The idea of the extra credit is for you to try to do things by yourself. If you think it's not well explained or if you have no idea just keep moving. It's probably because you don't identify that much with the challenge.
On the other hand if you have some ideas just try to start coding and when you have doubts or errors show some code so people can discuss it.
Wayne Leyden
4,995 PointsI would start with creating a class and calling it something like "Subject"' -Then use the init function to make it so that it takes a Argument (probably a Dictionary ) of student {names:[test scores]}
-For each different sort you wanted to create a Method.
Then when you created an instance that could be a different class. ex. say its a math teacher they would do algebra = Subject(algebra_dict)
they could then do algebra.average and it would return the info in the way they need it formatted.
Please keep us posted on what you come up with
Ryan Carson
23,287 PointsI would recommend you try to solve the problem by yourself and then post your code if you're still having trouble. That's the best way to learn. If you feel totally lost, please re-watch the videos and make sure you're coding along with the video, using Workspaces
Thanks for being a Treehouse Student!
Cheers, Ryan