From 6838939a1046f2db570b1a64f0743a78d954427d Mon Sep 17 00:00:00 2001 From: vwkd <33468089+vwkd@users.noreply.github.com> Date: Sat, 4 Sep 2021 00:15:25 +0300 Subject: [PATCH] motivate recursion formula --- src/pages/chapter1/index.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/chapter1/index.mdx b/src/pages/chapter1/index.mdx index 1f30d7d..fe6389f 100644 --- a/src/pages/chapter1/index.mdx +++ b/src/pages/chapter1/index.mdx @@ -56,7 +56,9 @@ let isEven = function (number) { And that’s exactly how you should be writing your code. But I want the book and the code written in it to be readable by programmers at all levels. If anywhere in the book, you think there’s a better way to write the same code, don’t hold yourself back. -Returning to our discussion about even and odd numbers, let’s consider the number `0`, we know that `0` is an even number, as it is divisible by `2`, `(0/2 = 0)`. Now what we can do with `0` is use it as an anchor in the natural sequence of numbers, starting from which the even and odd numbers alternate. +Returning to our discussion about even and odd numbers. What if we aren't as smart as Euclid and don't know fancy arithmatic yet? Is there still a way to find if a number is even or odd? + +Let’s consider the number `0`. We know that `0` is an even number, as it is divisible by `2`, `(0/2 = 0)`. Now what we can do with `0` is use it as an anchor in the natural sequence of numbers, starting from which the even and odd numbers alternate. ![Alternating of even and odd numbers.](7.png)