-
-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Eliuds Eggs exercise #639
Add Eliuds Eggs exercise #639
Conversation
homersimpsons
commented
Feb 25, 2024
•
edited
Loading
edited
- Should I add instruction about binary operators ? => yes (Add Eliuds Eggs exercise #639 (comment))
3e5cea5
to
f30e807
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with few adjustments.
I personally think that would be helpful, I would appreciate information on that, to easier solve the exercise. |
b22dd93
to
6d28ec7
Compare
I did add some instructions in: https://github.com/exercism/php/pull/639/files#diff-1b8add07daeefcbb201624c607300ed14d8a926741b6a6d9562b7faa1c9b291f Do you think this is enough? I think the current should be enough for someone providing a working solution such as: $displayValue = 89;
$eggCount = (($displayValue & 0b00000001) > 0)
+ (($displayValue & 0b00000010) > 0)
+ (($displayValue & 0b00000100) > 0)
+ (($displayValue & 0b00001000) > 0)
+ (($displayValue & 0b00010000) > 0)
+ (($displayValue & 0b00100000) > 0)
+ (($displayValue & 0b01000000) > 0)
+ (($displayValue & 0b10000000) > 0);
// => 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice recursive solution to the problem. Add the UUIDs if you want to, but we can merge it as is.
I think that is fine. One does not need much knowledge about binary operators, the PHP manual page will be enough. |
6d28ec7
to
b2d7f72
Compare
b2d7f72
to
f4f9b26
Compare