CSE101 – Solved

$ 20.99
Category:

Description

GitHub Classroom

Lab 6 – Sort
Miroslav Klose
Do you know Miroslav Klose?

GOoooooAAALLL of this Lab?
Sort football players by number of goals
• You are a sports reporter and have to write an article about the top scorers in World Cup.
• You asked the intern to prepare the list of top world cup scorers, but he gave you a completely shuffled list!!!!??
• Your job is to put things in order such that you only consider the top-5 best world cup scorers in the history
Here is how the list looks like in python
footballers = [ [“Rivaldo”, 8, “Brazil”],
[“Jürgen Klinsmann”, 11, “Germany”],
[“Pelé”, 12, “Brazil”],
[“Gary Lineker”, 10, “England”],
[“Miroslav Klose”, 16, “Germany”],
[“Just Fontaine”, 13, “France”],
[“Thomas Müller”, 10, “Germany”],
[“David Villa”, 9, “Spain”],
[“Iván Zamorano”, 7, “Chile”]]
Except that you have 35 of them!
How to sort that list?

Let’s look at the next page to see how it really work
Task 1: Bubble sort

TODO: to sort the footballers by number of goals, implement
Bubble sort in the function: BubbleSort()

Reviews

There are no reviews yet.

Be the first to review “CSE101 – Solved”

Your email address will not be published. Required fields are marked *