Files
python/exercises/practice/eliuds-eggs/.meta/example.py
Erik Schierboom 98e9bfeede pop-count: rename to eliuds-eggs (#3615)
* Rename the `pop-count` exercise to `eliuds-eggs`.

* Regenerated test file and renamed stub and test file.

* Changed exercise config file to match change in sub and test file naming.

* Corrected typo in exercise config for test file location.

---------

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
2024-02-02 10:34:26 -08:00

7 lines
146 B
Python

def egg_count(display_value):
eggs = 0
while display_value:
eggs += display_value % 2
display_value //= 2
return eggs