[Card Games] Refactor Tests and Add Sum() and Len() to Exercise
See original GitHub issuePer notes in PR2590, this exercise needs to have its tests and documents refactored. In particular:
- Refactor tests to include additional test scenarios and variants (with
subTest
) as needed. - Refactor
exemplar.py
to omit the use ofloops
, sinceloops
is not a prerequisite of this exercise, so cannot be used. - Edit
introduction.md
andinstructions.md
to cover the use of built-inslen()
andsum()
(to be used in place ofloops
in theexemplar.py
)
One suggestion to omit loops in exemplar.py
is to return sum(hand)/len(hand)
in card_average()
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Khan Academy Programming Study List Flashcards | Quizlet
Study with Quizlet and memorize flashcards containing terms like Joo-won is writing code to calculate the volume of a cone based on this...
Read more >Multiplayer card game "Hearts" with OOP in Python
I've defined both "play_card()" and "play_this()", because "play_this()" occured twice in the play_card(). Is this a bad choice to separate it?
Read more >A Gentle Introduction to Numerical Simulations with Python
Consider some game where each participant draws a series of random integers evenly distributed from 0 and 10, with the aim of getting...
Read more >28 Math Card Games That Turn Students Into Aces
In Vegas, they call this one “Blackjack,” but it makes a great learning game for kids too (no need to place bets). Not...
Read more >Fizz Buzz Test - C2 wiki
The "Fizz-Buzz test" is an interview question designed to help filter out the 99.5% ... Public Sub fizzbuzz() For n = 1 To...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes! I actually am almost done, I got sidetracked. Did not realize it has already been 21 days… wow… Will submit a PR hopefully tomorrow.
@J08K – are you still working on this? Plz let me know. Thanks!