Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's in this usefulib?
In this usefulib are two new functions:
The is_palindrome() function takes a string as input and checks whether it is a palindrome. A palindrome is a word, phrase, number, or sequence of characters that reads the same forward and backward (ignoring punctuation, and capitalization), such as "racecar" or "A man, a plan, a canal, Panama!". The function first converts the input string to lowercase and treats whitespaces as characters. It then checks whether the resulting string is equal to its reverse, and returns True if it is, or False otherwise.
The calculate_fibonacci() function takes a non-negative integer n as input and calculates the nth number in the Fibonacci sequence using recursion. The Fibonacci sequence is a series of numbers in which each number (starting from the third number) is the sum of the two preceding numbers. For example, the first ten numbers in the Fibonacci sequence are 0, 1, 1, 2, 3, 5, 8, 13, 21, and 34. The calculate_fibonacci() function uses recursion to calculate the nth number in the sequence by recursively calling itself with n-1 and n-2 as inputs until it reaches the base case of n=0 or n=1, at which point it returns the corresponding value in the sequence (0 or 1). The function returns the nth number in the sequence.
Did you add tests?
Yes, I was able to with the (self).
Does this solve an issue?
No, just adds 2 functions.
Checklist