This quiz was a little bit more of a challenge since it involved using iterations and strings to output a number in a sucession and determine if an input was a palindrome or wasn’t. It was difficult to find the pattern in the fibonacci series but i discovered that the values were passed to be sum again and again. First, there were standard results such as the first 2 numbers of the series so I did them with ifs to return the value required. For other values, I worked with 3 variables which changed values between them, and after the number was met the Sum would return from the function, thus giving the  expected value. 

Here’s the code: 

https://github.com/CarlosGallegosT/Codes007/blob/master/Fibonacci

The question regarding palindromes was a little bit more complicated than the previous one. During the test, I managed to create a function to reverse the string by using the input lenght. What I couldn’t do was to correctly compare the values found in the strings. I guessed I did something wrong with the return or with any of the functions since it only returned one statement. Finally, I tried again and it worked as expected. Here’s the code:

https://github.com/CarlosGallegosT/Codes007/blob/master/Palindrome

Thanks for watching!

CC BY 4.0 Palindromes and Fibonacci #Quiz7 by Carlos Gallegos is licensed under a Creative Commons Attribution 4.0 International License.