Skip to content

kennychan-git/primecalc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Prime Number Checker and Factorizer

This Python script allows you to check if a given positive integer is a prime number. If the number is not prime, it also provides the factors of that number.

Prerequisites

  • Python 3.x
  • multiprocessing module
  • math module
  • time module

Usage

  1. Clone the repository or download the script file.
  2. Open the terminal or command prompt.
  3. Navigate to the directory where the script is located.
  4. Run the script using the following command: python prime_checker.py
  5. Enter a positive integer when prompted.
  6. The script will output whether the number is prime or not, along with its factors (if applicable).
  7. The elapsed time to execute the computation will also be displayed.
Enter a positive integer to check if it is a prime number: 20 
20 is not a prime number. 
Factors of 20: [1, 20, 2, 10, 4, 5] 
Number of factors: 6 
Time elapsed: 0.0012357234954833984 seconds. 

License

This project is licensed under the MIT License.

Feel free to contribute and enhance the functionality of this script.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages