Hi! This is by far the hardest WSQ I have done. It consisted of creating a Lychrel Number detector but also inform about natural palindromes and Non Lychrel Number. So, to understand this, I guess it’s important to introduce the concept of a Lychrel Number. But to do so, first we have to understand what is a palindrome. A palindrome is a word or number which can be read backwards or normally and says the same, for instance, 12344321 is a palindrome, so is dad. Well, a Lychrel Number is one that does not become palindrome after several iterations of the addition of the reverse. The first known number to be known as Lychrel is 196.
So now that we know what we’re talking about, I’ll talk about the coding process. At first, I had issues sorting all that should be done and how would I do it. But after creating functions and using loops I managed to find the basis of the subject. The first function I created was to reverse the number, I found a nice formula used to reverse a number in this site: //http:/
And without further ado, here’s the code:
https:/
Thanks for watching the code, it was a real challenge. #WSQ11 #TC1017 #TodosSomos196
My reaction throughout this coding:
Image Source: https:/
Yo Soy 196 #WSQ11 by Carlos Gallegos is licensed under a Creative Commons Attribution 4.0 International License.