Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Number-Utility-Program

Overview

This Python program provides a menu-driven interface for performing various operations related to numbers. Users can check if a number is prime, check if a number is a palindrome, and print the multiplication table for a given number. Additionally, users can perform all three checks at once.

Functions

space()

  • Description: Prints a decorative separator to enhance the readability of the output.

prime(a)

  • Description: Checks if the given number is prime and prints the result.
  • Parameters:
    • a (int): The number to check.

palindrome(a)

  • Description: Checks if the given number is a palindrome and prints the result.
  • Parameters:
    • a (int): The number to check.

table(a)

  • Description: Prints the multiplication table for the given number from 1 to 10.
  • Parameters:
    • a (int): The number for which the multiplication table is to be printed.

Menu Options

  1. Check Prime, Palindrome, and Print Multiplication Table:

    • Prompts the user to input a number.
    • Checks if the number is prime.
    • Checks if the number is a palindrome.
    • Prints the multiplication table for the number.
  2. Check Prime:

    • Prompts the user to input a number.
    • Checks if the number is prime and prints the result.
  3. Check Palindrome:

    • Prompts the user to input a number.
    • Checks if the number is a palindrome and prints the result.
  4. Print Multiplication Table:

    • Prompts the user to input a number.
    • Prints the multiplication table for the number.
  5. Exit the Program:

    • Exits the program.

How to Run the Program

  1. Run the script.
  2. Follow the on-screen menu options.
  3. Enter your choice (1-5) and input the required values as prompted.
  4. The program will continue to prompt for input until you choose to exit by entering 5.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages