Posts

Showing posts from March, 2019

Finding Fibonacci Numbers

Image
Hello, I know this has been a while since my prior post and I have not gotten out any video yet doing a tutorial on a program I did. I have been having a busy week at university and I've been rather skeptical on the program I was originally going to use for the tutorial, as it's overly complicated for its results. I may actually use this program for my tutorial as it would be easier to explain and is less complicated. For now I'll continue with this program. You may find the program here on Github. I guess I won't have to give much explanation on the Fibonacci sequence. Basically, it's a sequence where a term is the sum of the two prior terms. This program, when inputted a number n, will return the nth term in the Fibonacci sequence. It works by making the a list of all terms within the Fibonacci sequence from 0 to n and returning the last item in the list.  As its does the regular method, it works accurately for even large numbers and should work up to the lim

Counting Palindromes with a Certain Ending & an Announcement

Hello. With this small program comes a large, important update. I shall talk about it right after going over this small program. The Program In relations to the prior post about a program finding the next program. I have been tasked to make a program where it must find how many palindromes with a certain length exist with a certain ending. It turned out to be an easy task and I was able to code up the program in an afternoon. You can find it here on github. The programs simply requests from the user a number to serve as the ending of a palindrome and a number serving as the length of the numbers being looked at. After getting two valid integers for both, by making sure they are positive integers, the program then does the following equation: z = roundup(length of numbers being looked at / 2) - length of first inputted number If z is greater than or equal to 0, the program will return 10^z . Otherwise, it will return 0. For instance, let's find the amount of palind