/EmirpPrimeCheck

Script checks if the entered integer is an Emirp prime number or not.

Primary LanguagePythonMIT LicenseMIT

Contributors Commit-activity Issues Repo-size License
Forks LinkedIn

Welcome to EmirpPrimeCheck !!!

Script checks if the entered integer is an Emirp prime number or not. An emirp is a prime number that results in a different prime when its decimal digits are reversed.

What does the script do?

The script prints a string informing whether or not the entered integer is an emirp prime number.

emirpPrimeCheck.py :

This script is ready to use script which uses one arguments to run. The argument is the integer passed for the check.

Installing the dependencies

Used packages

This script require the math, sys and doctest package.

How to use it

1. Clone this repository:

$ git clone https://github.com/StokicDusan/EmirpPrimeCheck.git
$ cd EmirpPrimeCheck/

2. Launch:

In the command line simply invoke the script with one argument:

$ python emirpPrimeCheck.py argv1
  • argv1:
    Any positive integer

⚠️ Note: Other input will result in an error

Invoking the script with no or less arguments will run testmod().

Examples

The following code block shows examples of calling the emirpPrimeCheck script from terminal.

$ python3 emirpPrimeCheck.py 100
It is not an Emirp
$ python3 emirpPrimeCheck.py 311
It is an Emirp!
$ python3 emirpPrimeCheck.py 12721
It is not an Emirp, palindromes don't count

Provide Feedback 👍

If you encounter any bugs or have suggestions, please file an issue in the Issues section of the project.