3 thoughts on “12: Pseudocode to calculate googol!

  1. Wow. I can’t believe you wrote code – that’s amazing.
    In your post, I suppose, you start counting n from 1. It’s the most natural thing to do. But some computer programmers and languages start counting from 0 not 1. Can you think of why it may be useful to count from 0 than 1? Hint: ask mom.

  2. True. It makes the math simpler because counting is usually for indexing.

    If you want to divide things into k groups, the nth item is in group n/k when counting from zero but in group 1+(n-1)/k when counting from 1.

    If centuries were counted from zero, the year 1905 would be in the 19th century not 20th.

    Power series in math begin counting from zero while some others like matrices begin counting from one.

    Ultimately, I think it’s because it makes the math simpler. You could call it efficiency of course.

Leave a Reply

Your email address will not be published. Required fields are marked *