From b7d781c3caceaa462e620aded11e8867f6d1ab5d Mon Sep 17 00:00:00 2001 From: dwrz Date: Mon, 15 Nov 2021 20:53:01 +0000 Subject: [PATCH] Add python/high-scores --- python/high-scores/HELP.md | 55 +++++++++++++++++ python/high-scores/README.md | 37 +++++++++++ .../__pycache__/high_scores.cpython-39.pyc | Bin 0 -> 776 bytes ...gh_scores_test.cpython-39-pytest-6.2.5.pyc | Bin 0 -> 2862 bytes python/high-scores/high_scores.py | 14 +++++ python/high-scores/high_scores_test.py | 58 ++++++++++++++++++ 6 files changed, 164 insertions(+) create mode 100644 python/high-scores/HELP.md create mode 100644 python/high-scores/README.md create mode 100644 python/high-scores/__pycache__/high_scores.cpython-39.pyc create mode 100644 python/high-scores/__pycache__/high_scores_test.cpython-39-pytest-6.2.5.pyc create mode 100644 python/high-scores/high_scores.py create mode 100644 python/high-scores/high_scores_test.py diff --git a/python/high-scores/HELP.md b/python/high-scores/HELP.md new file mode 100644 index 0000000..94d6b4b --- /dev/null +++ b/python/high-scores/HELP.md @@ -0,0 +1,55 @@ +# Help + +## Running the tests + +To run the included *tests*, run the test file using the `pytest` module, replacing `{exercise_name}`: + +```bash +$ python3 -m pytest {exercise_name}_test.py +``` + +Many IDE's and code editors have built-in support for using Pytest to run tests; check them out [here](https://github.com/exercism/python/blob/main/docs/TOOLS.md#editors-and-ides). + +For more information about running tests using `pytest`, checkout our [Python testing guide](https://github.com/exercism/python/blob/main/docs/TESTS.md#pytest). + +### Common pytest options + +- `-v` : enable verbose output. +- `-x` : stop running tests on first failure. +- `--ff` : run failures from previous test before running other test cases. + +For other options, see `python3 -m pytest -h`. + +## Submitting your solution + +You can submit your solution using the `exercism submit high_scores.py` command. +This command will upload your solution to the Exercism website and print the solution page's URL. + +It's possible to submit an incomplete solution which allows you to: + +- See how others have completed the exercise +- Request help from a mentor + +## Need to get help? + +If you'd like help solving the exercise, check the following pages: + +- The [Python track's documentation](https://exercism.org/docs/tracks/python) +- [Exercism's support channel on gitter](https://gitter.im/exercism/support) +- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs) + +Should those resources not suffice, you could submit your (incomplete) solution to request mentoring. + +Below are some resources for getting help if you run into trouble: + +- [The PSF](https://www.python.org) hosts Python downloads, documentation, and community resources. +- [Python Community on Discord](https://pythondiscord.com/) is a very helpful and active community. +- [#python on Libera.chat](https://www.python.org/community/irc/) this is where the cored developers for the language hang out and get work done. +- [Exercism on Gitter](https://gitter.im/exercism/home) join the Python room for Python-related questions or problems. +- [/r/learnpython/](https://www.reddit.com/r/learnpython/) is a subreddit designed for Python learners. +- [Python Community Forums](https://discuss.python.org/) +- [Pythontutor](http://pythontutor.com/) for stepping through small code snippets visually. + + +Additionally, [StackOverflow](http://stackoverflow.com/questions/tagged/python) is a good spot to search for your problem/question to see if it has been answered already. + If not - you can always [ask](https://stackoverflow.com/help/how-to-ask) or [answer](https://stackoverflow.com/help/how-to-answer) someone else's question. \ No newline at end of file diff --git a/python/high-scores/README.md b/python/high-scores/README.md new file mode 100644 index 0000000..175c102 --- /dev/null +++ b/python/high-scores/README.md @@ -0,0 +1,37 @@ +# High Scores + +Welcome to High Scores on Exercism's Python Track. +If you need help running the tests or submitting your code, check out `HELP.md`. + +## Instructions + +Manage a game player's High Score list. + +Your task is to build a high-score component of the classic Frogger game, one of the highest selling and addictive games of all time, and a classic of the arcade era. Your task is to write methods that return the highest score from the list, the last added score and the three highest scores. + +In this exercise, you're going to use and manipulate lists. Python lists are very versatile, and you'll find yourself using them again and again in problems both simple and complex. + +- [**Data Structures (Python 3 Documentation Tutorial)**](https://docs.python.org/3/tutorial/datastructures.html) +- [**Lists and Tuples in Python (Real Python)**](https://realpython.com/python-lists-tuples/) +- [**Python Lists (Google for Education)**](https://developers.google.com/edu/python/lists) + +## Source + +### Created by + +- @behrtam + +### Contributed to by + +- @BethanyG +- @cmccandless +- @Dog +- @gabriel376 +- @GascaK +- @simmol +- @tqa236 +- @yawpitch + +### Based on + +Tribute to the eighties' arcade game Frogger \ No newline at end of file diff --git a/python/high-scores/__pycache__/high_scores.cpython-39.pyc b/python/high-scores/__pycache__/high_scores.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..db0280218aa817e2ec5efb9b1e05bcd11b69d179 GIT binary patch literal 776 zcma)4%}T>S5Z?SWO)F6lDR}c5Q1b#JqW4_t$xDct)fAd0%*NVEZ|YIsqpy@}PkjYF z=*))HB0-$6v$NUV`M&*TV$bUfvd`6fd}Ii*;>EU^w78(5j>&-l<3-#EFu|hP02?|q zo8Ul~W(!>C(QHG1DEys-@@rl`+GhBa>EydEP9F^oK74k{#J}!ea z&tw3P_!PvLq@$?}k{o0pXA+Z<%7S8EruigDNB8MTeO<><9iJBS${EL{R3%eToLLy? zkpG)sNerKjA+ZX5qq4Gih8A7=p@tn=R$d`d<&$_E-4cXNzZ!^M8w4NF5*$##5MY4$ zW|FYhtEuI%!)wCpqMTAI4ccxS8Y{0~&Cg#@(KS*nWt*sjx^};D_$3X_9>t;G(S<~o8hIBP c9(ix8PP&B*P)qzj=eX|D?XY$!R7 z4d;^N+-GQe^COklp7s@b>I|vXu5D@EpwVJyh7>uPZ)P~da4_f+c;5W=Tliy}kiT)T z_&6}wfq%XSgcD9<5>U;p#I^_}i4(M_dE*8yys_eT;ssvP2|7tP=qA0Om-K@^B~J;r zx$};2N4UQZ-rB(mr_YGrnu2Ds>$j8}hlR)swP835_X{Cekxf`JmO`k(M94f#!&zGNdGWm4o9w~p`=i;o3^9r$ZlLPH8HPPz4t1hz3VaCnQmFmCZS_kg>+!@I!S zyvO^%JwD(oz&m`EUjyFdYkVDek6#B^H`K~6(ZTqcwr3CQ9nl2?Y>?5lPtb-2RDSV#tr=$uN|oar9CQM;RAG@k+>1lqbW< zaWT%);TV8y87*37rI#^U+mmCph5{?2rr)9d+yz3YM;&^ydEOV>mp1%=@7UA(@Hy!L znf^SJd`tFFMqkT5612>aYapq0ZAq0$m{>Ppe$nTEx^quKbcK-Vm^z%2-IV|WKs z45f~z>{OD*gC@zFN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