Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/iriw/prime-number-check-prj

Python course task. Provide the number as input and run. The program will calculate if the number is prime or not. Prime = divisible by itself and by 1. Note: 1 is not prime, as it's divisible by 1 only.
https://github.com/iriw/prime-number-check-prj

Last synced: about 2 months ago
JSON representation

Python course task. Provide the number as input and run. The program will calculate if the number is prime or not. Prime = divisible by itself and by 1. Note: 1 is not prime, as it's divisible by 1 only.

Awesome Lists containing this project

README

        

# Prime number checker

This is a simple checking program, which calculates if the number provided is prime or not.

Prime numbers are numbers that can only be cleanly divided by themselves and 1. [Wikipedia]
Function is_prime() checks whether the number passed into it is a prime number or not.
It should return True or False.

e.g.
7 is a primer number because it is only divisible by 1 and itself.
But 4 is not a prime number because you can divide it by 1, 2 or 4.
NOTE: 2 is a prime number because it's only divisible by 1 and itself, but 1 is not a prime number because it is only divisible by 1. """