Ada Lovelace's Note G

Discussion thread for Ada Lovelace’s Note G.

I think there’s an issue with the ‘1st Bernoulli number’ check.
Despite explicitly stating that we should use B_1 = -0.5, this returns a failed attempt during the checking stage, since the bot is apparently expecting 0 and 1 rather than -1 and 2 as the numerator and denominator. See image:

Hey @furankuftw, thanks for reporting this!

Just checked and we made a dumb mistake in the solution haha. Used if n % 2 == 1 when it should have been if n >= 2 and n % 2 == 1 to return 0/1.

Just fixed it so it should be -1/2 now!

1 Like

All works as expected now! Ty