* 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>
7 lines
146 B
Python
7 lines
146 B
Python
def egg_count(display_value):
|
|
eggs = 0
|
|
while display_value:
|
|
eggs += display_value % 2
|
|
display_value //= 2
|
|
return eggs
|