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.
- Python 3.x
- multiprocessing module
- math module
- time module
- Clone the repository or download the script file.
- Open the terminal or command prompt.
- Navigate to the directory where the script is located.
- Run the script using the following command:
python prime_checker.py
- Enter a positive integer when prompted.
- The script will output whether the number is prime or not, along with its factors (if applicable).
- 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.
This project is licensed under the MIT License.
Feel free to contribute and enhance the functionality of this script.