================================================================================
  Question 8: Number Analyzer Challenge
================================================================================

FULL QUESTION:
Your task is to develop a program that performs a comprehensive analysis of an
integer provided by the user. For a given input number, your program should
determine and clearly state whether it exhibits the following properties:

1. Positive / Negative / Zero
2. Even / Odd
3. Prime Number: Greater than 1 with no divisors other than 1 and itself.
4. Armstrong Number: Sum of digits raised to the power of number of digits equals n.
5. Perfect Number: Equal to sum of its proper positive divisors.
6. Factorial: Computed if non-negative.
7. Divisors: List all positive divisors.
8. Palindrome Number: Reads the same forwards and backward.

SHORT QUESTION:
Comprehensive integer analyzer checking prime, Armstrong, perfect, palindrome, parity, and factorials.

================================================================================
README & SETUP INSTRUCTIONS:
================================================================================
# Question 8: Number Analyzer Challenge

- Prerequisites: Python 3.x (Standard library math module).
- Setup: None.
- How to Run: python question_08.py
- Expected Behavior: Prompts user for an integer and prints its mathematical classification.

================================================================================
SOURCE CODE FILES:
================================================================================

1. question_08.py
--------------------------------------------------------------------------------
import math

def evenodd(num):
  if num % 2 == 0:
    print(f"{num} is an Even number.")
  else:
    print(f"{num} is an Odd number.")

def palindrome(num):
  if num >= 0 and str(num) == str(num)[::-1]:
    print(f"{num} is a palindrome integer.")
  else:
    print(f"{num} is not a palindrome integer.")

def armstrong(num):
  num_str = str(abs(num))
  num_digits = len(num_str)

  armstrong_sum = sum(int(digit) ** num_digits for digit in num_str)

  if num == armstrong_sum:
    print(f"{num} is an Armstrong number.")
  else:
    print(f"{num} is not an Armstrong number.")

def prime(num):
  if num <= 1:
    print(f"{num} is not a prime number.")
  else:
    is_prime = True

    for i in range(2, int(math.sqrt(num)) + 1):
        if num % i == 0:
            is_prime = False
            break

    if is_prime:
        print(f"{num} is a prime number.")
    else:
        print(f"{num} is not a prime number.")
def perfect(num):
  if num <= 0:
    print(f"{num} is not a perfect number.")
  else:
    divisor_sum = 0

    for i in range(1, num):
        if num % i == 0:
            divisor_sum += i

    if divisor_sum == num:
        print(f"{num} is a perfect number.")
    else:
        print(f"{num} is not a perfect number.")

num = int(input("Enter the integer: "))

evenodd(num)
palindrome(num)
armstrong(num)
prime(num)
perfect(num)
--------------------------------------------------------------------------------
