Question

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.

11 Mar 2023
Answer :
Word Count : 654

```python
# Menu Driven Program

def fibonacci_series(n):
    a, b = 0, 1
    series = []
    for _ in range(n):
        series.append(a)
        a, b = b, a + b
    return series

def factorial(n):
    fact = 1
    for i in range(1, n + 1):
        fact *= i
    return fact

def check_odd_even(num):
    if num % 2 == 0:
        return "Even"
    else:
        return "Odd"

def check_palindrome(s):
    s = s.replace(" ", "").lower()  # Ignoring spaces and case sensitivity
    return "Palindrome" if s == s[::-1] else "Not Palindrome"

def main():
    while True:
        # Menu for the user
        print("\nMenu:")
        print("1. Display Fibonacci Series")
       

________ ________ ______ ___ _____ __________ _________ _________ __________.
____ _____ ___ _____ ______ _________ _______.
______ _______ _______ _________ ____ _______ ______.
____ ___ ________ __________ ____ _______ ________.
_________ ___ ____ ___ ___ ________ __________ _________ ______.
_________ ________ ___ __________ __________ _______ ____ ____ _________ __________ _________.
__________ ____ _______ ___ ________ ______ ___ ___ __________ _______.
________ _______ _______ _____ ________ ________ __________.
_______ ___ _____ ______ _________.
________ ____ ___ ____ _____ ___ ___.
______ _____ ____ ___ _____ _______ ___ _________ ____.
_____ ________ _______ _______ ______ _____ ________ __________ _____ ________ __________ _______.
______ __________ __________ _________ ________ _____ __________ ________ ____ ______ ___.
______ ______ __________ ________ ________ __________ _____ ___.
_____ ________ _______ __________ __________ _____ _________ _________ ______ __________ ____ ____.
_________ _____ ___ _____ _________ ________ ____ ____ ______.
_____ ________ ___ __________ ______ ____.
__________ ____ ______ ____ ______.
____ ____ ________ ________ __________ _________ _________ _________ ____ _________ _________.
___ ___ _________ ________ ______ _______ __________ ___ ______ ________.
____ _________ __________ __________ ________ ________ _________ _______.
___ _______ _______ _____ __________.
______ ______ __________ _____ _____.
________ ______ ___ _______ ____ ________.
______ _______ _____ __________ ____ _________ _________ ____ ______.
_____ __________ ____ _______ __________.
_________ _______ ________ ________ __________ _________ ________ _________.
________ __________ ___ ________ _________.
____ ___ _____ ______ ____ _________ ___ ______ __________ __________.
___ ____ ______ _______ ______ ________ ________ ____ ______ ____ _________.
______ ______ _______ ___ ________ ________ _______ ____ ______ ___ ____.
________ _______ ____ __________ ____ _________ ____ ______ _________ ____.
________ _______ _________ _____ ____ ____ ____ ________ ___.
______ _______ ___ ____ ________.
______ __________ _____ __________ ______.
________ ______ _____ __________ _______.
___ _____ ______ _________ _______ _____ _______ ______.
__________ __________ _______ ________ __________ ___ ___ __________ ______ __________ _________ ____.
____ __________ _____ _________ ___.
________ ______ ________ _____ __________.
________ _______ ____ __________ ______ ___ _______ ____ ______ ____ _____ _____.
_______ __________ _____ ____ _______ ______ ______ _________ ____ ____.
_________ _________ _______ _______ _____ ___ _____ ___ ____ _____ _____ ____.
________ ______ _________ __________ ___ ________ _______ ___.
_________ _________ _______ ______ _____ ______ __________ ____ ___ ______ ___ ____.
________ _____ ______ __________ ____ __________ ___ ____ ____.
_______ _________ ________ ___ _______ _____ ___ ________ ____ __________.
__________ ____ ___ _______ _________.
______ ___ __________ ________ _________ _______ _____ ________ ___.
_________ ___ ____ ________ ________ __________ _________.
__________ ______ ________ ____ ______.
________ _______ ______ ________ _______ ___ _____ ____ __________ _____ _____.
___ ______ ________ _________ ________.
____ ___ _________ _____ ________ ________ ___ _________ ___ _____ __________.
_______ ____ _____ _________ __________ ________ ________ __________ __________.
________ _______ ________ ___ _________ ___ __________ _____ __________ _______.
_________ ______ _________ ___ _____ ____.
_____ ______ _____ _____ ________ _______ ________.
IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
Top
📞
Call Support Instant phone assistance IGNOU MLIL 7 2023 - Write a menu driven program for following: a) display a Fibonacci seri | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→