Your question is Fibonacci and Palindrome Programs. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Cyient engineering utilities may need both sequence generation and text validation. Implement one function that computes a Fibonacci value and determines whether a supplied string is a palindrome.
Write fibonacci_and_palindrome(n, text), where n is a non-negative integer and text is a string. Return a two-element list [fib_value, is_palindrome].
Use the definition F(0) = 0, F(1) = 1, and F(n) = F(n - 1) + F(n - 2). The palindrome check is case-sensitive and must compare every character exactly as supplied, including spaces and punctuation. Do not create a reversed copy of the string.
def fibonacci_and_palindrome(n, text):