pybites / challenges

PyBites Code Challenges
https://codechalleng.es/challenges/
692 stars 2.29k forks source link

PCC02 #640

Open rmachuca89 opened 5 years ago

rmachuca89 commented 5 years ago

ATTENTION: before clicking "Create Pull Request" please submit some meta data, thanks!

Difficulty level (1-10): [4] Estimated time spent (hours): [3] Completed (yes/no): [yes] I stretched my coding skills (if yes what did you learn?): [ practice shallow copy, random.sample, raw f-strings, "garvey" word definition, itertools.permutation (from pybites solution) ] Other feedback (what can we improve?): [ N/A. ]

Question: How do you test a function (i.e. my own test_calc_optimal_word() implementation) without first calculating it with itself? Manually generating the solution by going myself through the word list and calculating its value? Ideas are appreciated.