Files
python/exercises/high-scores/example.py
Pavlin Angelov 89bb17a155 Simplify High-scores exercise. Replace Class with functions (#1764)
* Simplify High-scores exercise. Replace Class with functions
Exercise text edited.
Tests made to expect functions. One test removed, cause was no longer valid.
Make new example.py using functions.
Add the functions as starting point in the exercise file. (This also make the tests not complain of missing imports and such.)
Added __init__.py to the package for the people that still run 2.7+
Added pytest cache to gitignore file

* Fix style problems

* Made requested changes in PR
Remove __init__.py
Remove content of HINTS.md
Generate the README.md
Remove the comments in stub file

* Add new hints to high-score

Added hints for some docs around list and tuples - thanks @BethanyG for that

Moved original hints for classes in matrix ( cause is the next exercise for now which use class)
slightly edited to not refer to high-score

Regenerate both README.md

* Remove changes to matrix from this PR

* Update exercises/high-scores/.meta/HINTS.md

Co-Authored-By: simmol <simmol@users.noreply.github.com>

* Update exercises/matrix/README.md

Co-Authored-By: simmol <simmol@users.noreply.github.com>

* Regenerate README
2019-05-03 14:30:18 -04:00

11 lines
172 B
Python

def latest(scores):
return scores[-1]
def personal_best(scores):
return max(scores)
def personal_top_three(scores):
return sorted(scores, reverse=True)[:3]