GithubHelp home page GithubHelp logo

stokicdusan / printemirp Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 19 KB

Script for printing emirp prime numbers on the command line.

License: MIT License

Python 100.00%
python3 python-script prime-numbers python recreational-mathematics

printemirp's Introduction

Contributors Commit-activity Issues Repo-size License
Forks LinkedIn

Welcome to PrintEmirp

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 emirp prime numbers on the command line.

printEmirp.py :

This script is ready to use script which uses one argument to run. The argument is the integer passed for the upper bound of numbers to be checked if they are emirp numbers.

print_emirp function:

Function prints numbers divided by a space character.
Invoking the script runs this function.

print_emirp_count function:

Function prints numbers divided by a space character and a count of how many numbers it printed in the new line.

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/PrintEmirp.git
$ cd PrintEmirp/

2. Launch

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

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

โš ๏ธ Note: Other input will result in an error

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

Examples

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

$ python3 printEmirp.py 7

$ python3 printEmirp.py 100
13 17 31 37 71 73 79 97 
$ python3 printEmirp.py 1000
13 17 31 37 71 73 79 97 107 113 149 157 167 179 199 311 337 347 359 389 701 709 733 739 743 751 761 769 907 937 941 953 967 971 983 991 

Provide Feedback ๐Ÿ‘

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

printemirp's People

Contributors

stokicdusan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.