Skip to content

Commit

Permalink
Rename proposed exercise Eliud's Eggs to Pop Count
Browse files Browse the repository at this point in the history
  • Loading branch information
keiravillekode committed Oct 13, 2023
1 parent ddb707f commit a6cafdd
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 27 deletions.
2 changes: 0 additions & 2 deletions exercises/eliuds-eggs/metadata.toml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,46 +1,37 @@
{
"exercise": "eliuds-eggs",
"exercise": "pop-count",
"cases": [
{
"uuid": "559e789d-07d1-4422-9004-3b699f83bca3",
"description": "pop-count of 0",
"property": "popCount",
"description": "all zeros",
"property": "eggCount",
"input": {
"number": 0
},
"expected": 0
},
{
"uuid": "2e4615f8-b90f-45db-b5b4-31b5f4a6afbe",
"description": "pop-count of 1",
"property": "popCount",
"input": {
"number": 1
},
"expected": 1
},
{
"uuid": "97223282-f71e-490c-92f0-b3ec9e275aba",
"description": "pop-count of 16",
"property": "popCount",
"description": "1 egg",
"property": "eggCount",
"input": {
"number": 16
},
"expected": 1
},
{
"uuid": "1f8fd18f-26e9-4144-9a0e-57cdfc4f4ff5",
"description": "pop-count of 89",
"property": "popCount",
"description": "4 eggs",
"property": "eggCount",
"input": {
"number": 89
},
"expected": 4
},
{
"uuid": "0c18be92-a498-4ef2-bcbb-28ac4b06cb81",
"description": "pop-count of 2000000000",
"property": "popCount",
"description": "13 eggs",
"property": "eggCount",
"input": {
"number": 2000000000
},
Expand Down
8 changes: 8 additions & 0 deletions exercises/pop-count/instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Instructions

Your task is to count the number of 1 bits in the binary representation of a number.

## Restrictions

Keep your hands off that bit-count functionality provided by your standard library!
Solve this one yourself using other basic tools instead.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Description
# Introduction

Your friend Eliud inherited a farm from her grandma Tigist. Her granny was an inventor and had a tendency to build things in an overly complicated manner. The chicken coop has a digital display showing an encoded number representing the positions of all eggs that could be picked up.
Your friend Eliud inherited a farm from her grandma Tigist.
Her granny was an inventor and had a tendency to build things in an overly complicated manner.
The chicken coop has a digital display showing an encoded number representing the positions of all eggs that could be picked up.

Eliud is asking you to write a program that shows the actual number of eggs in the coop.

Expand Down Expand Up @@ -43,8 +45,3 @@ Decimal number on the display:
Actual eggs in the coop:
1
```

## Restrictions

Keep your hands off that bit-count functionality provided by your standard library!
Solve this one yourself using other basic tools instead.
4 changes: 4 additions & 0 deletions exercises/pop-count/metadata.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
title = "Pop Count"
blurb = "Count the 1 bits in a number"
source = "Christian Willner, Eric Willigers"
source_url = "https://forum.exercism.org/t/new-exercise-suggestion-pop-count/7632/5"

0 comments on commit a6cafdd

Please sign in to comment.