You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
In the section of about_math.pl dealing with modulus and using it to determine if a number is even or odd, I found it interesting that to get the tests to pass requires an odd number for $even and an even number for $odd. Is this intentional? Or maybe I'm just missing something here!
my$even = 3;
my$odd = 2;
is ($even % 2, 1, "modulus is often used to determine even/odd");
is ($odd % 2, 0, "modulus is often used to determine even/odd - part 2");
The text was updated successfully, but these errors were encountered:
@muraiki you're absolutely correct, this test is backwards.. even number mod 2 is 0. i'm fairly certain i've already fixed this in the 'fixing' branch, but i just haven't pushed it up yet, will leave this open until i can track down the commit.
I didn't notice that there was a fixing branch -- sorry!
On Mon, Mar 10, 2014 at 12:21 PM, Conor Horan-Kates < [email protected]> wrote:
@muraikihttps://github.com/muraiki you're absolutely correct, this
test is backwards.. even number mod 2 is 0. i'm fairly certain i've already
fixed this in the 'fixing' branch, but i just haven't pushed it up yet,
will leave this open until i can track down the commit.
thanks for noticing!
Reply to this email directly or view it on GitHubhttps://github.com//issues/18#issuecomment-37201550
.
In the section of about_math.pl dealing with modulus and using it to determine if a number is even or odd, I found it interesting that to get the tests to pass requires an odd number for $even and an even number for $odd. Is this intentional? Or maybe I'm just missing something here!
The text was updated successfully, but these errors were encountered: