Write a menu driven program for following: a) display a Fibonacci series b) compute Factorial of a number c) to check whether a given number is odd or even. d) To check whether a given string is palindrome or not.
Creating a menu-driven program in Python for the tasks you've mentioned is a practical and useful exercise for beginners. Here's a step-by-step guide on how to implement such a program:
```python
# Function to display the Fibonacci series
def display_fibonacci():
n = int(input("Enter the number of terms in the Fibonacci series: "))
a, b = 0, 1
count = 0
while count < n:
print(a, end=' ')
a, b = b, a + b
count += 1
# Function to compute the factorial of a number
def compute_factorial():
num = ________ _____ ______ _________ _______ ______ _______ _________ __________.
_________ ____ _____ ___ ____ _____ _____ _________ __________.
__________ _______ _________ _____ ____ ______ _______ _________.
__________ _________ ____ ______ _________ ______ _____ _________ _____ ____ __________.
__________ ______ _______ _____ _____ _______ _____ _________ ______ ______ _______ __________.
_______ ____ ______ ________ _____ ________ __________ _____ ____ _________ ____ __________.
________ ___ ________ __________ _________ __________.
_____ _________ _____ _______ __________ ________ _____ _________.
_______ _________ _____ __________ ___ ___ ___ ___ ____ __________.
___ ________ _______ _____ _______ __________ __________ ___ ______.
_____ _________ ____ ___ ______ ____ _________ ______ ________.
____ _____ __________ ________ __________ ______.
__________ ____ _______ ______ ________.
___ ______ ____ ___ ___ ___ ______ _________.
________ ____ _________ _____ ___ __________ _____ _______ _________ ___ ________.
__________ ______ ________ _________ _________ _______ _____ ____.
___ _________ ____ __________ ____ _________ ________ ________ _________ _________ ___ ______.
___ ___ _____ ___ ________ ____ __________ ___ _________ _________.
________ ____ _________ ________ ____.
______ ______ ________ ______ _______ _____ _________ _______ ______ ___.
_________ ______ ____ _______ ________ ________ __________.
____ ________ ________ __________ ___ __________ ______.
_______ _____ ______ __________ _________ ________ __________ ________.
___ ___ ______ _____ __________ ______ ____ ______ ___ _________ ____ ______.
____ ___ ____ ________ ____ _____ ____ ________ ___ ______ ______ ____.
____ ___ ______ _______ _________.
____ _________ ____ _________ _______ ________ ___.
__________ __________ ____ _________ ___ _________ ____ _______ ________ _______ ______.
___ _________ _____ __________ ____ ___ ____ _________ ______.
______ _____ ____ ________ __________ __________ _________.
______ __________ _____ __________ __________ _____ _________ _________.
___ ______ _____ _______ ______ _________ _________ ___ ____ _________ ___.
_________ ___ ___ ____ ____ ____ ____.
________ ___ ______ _______ __________ ______ _____ ___ _________ __________ _______ __________.
______ ____ ___ _____ ______ _______ _______.
____ __________ _______ ____ _____ _________ _________.
_____ ____ ________ ____ __________.
__________ __________ _______ ____ _____.
__________ ________ _____ __________ ________.
_______ __________ _______ __________ __________ _________ _________ __________ _____ ______ ______.
__________ ____ _____ ___ ___ ________ ________ _____ ___.
_________ _________ _________ _______ _______ ____ ____ _______ _________ ____ _______.
___ ______ _____ _______ _______ ___.
______ ___ __________ ____ ____ ___ ______ _________ ________.
_________ _______ _______ ________ ______ ______ _________ _________ _________.
____ ____ _________ _________ __________ ___ ______ _____ _________.
_______ _______ ____ ___ ___.
______ ____ ______ ____ ____ ___.
_______ ___ _____ _________ _______ __________ ______.
___ ___ ________ ______ ______.
___ ________ ____ ___ ____ ________ ___ ______.
__________ _______ _______ _____ _________ __________ ___ __________ __________ _________ _____ _______.
____ ________ ___ ___ _________ ___ _____ ___.
_____ __________ ____ ____ __________ ________ __________ ______ ________ __________ _________ ___.
___ _______ __________ ________ ___ ___ ___ __________ ___ __________ _____ _________.
_________ __________ _______ _____ ______ _________ _____ __________ ___ _____ ____.
_____ ______ _______ ________ ______.
________ ____ ________ ___ _______.
______ ____ ___ _________ ________ ____.
Get Full Answer on WhatsApp