Skip to content

This script is ready to use script to takes an argument and calculates all amicable number pairs smaller than the inputted number.

License

Notifications You must be signed in to change notification settings

StokicDusan/AmicableNumbers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Commit-activity Issues Repo-size License
Forks LinkedIn

Welcome to AmicableNumbers !!!

Amicable numbers are two different numbers related in such a way that the sum of the proper divisors of each is equal to the other number.

What does the script do?

The script prints amicable numbers on the command line.

amicableNumbers.py

This script is ready to use script to takes an argument and calculates all amicable number pairs smaller than the inputted number.

Installing the dependencies

Used packages

This script require the math, sys, doctest and time package.

How to use it

1. Clone this repository:

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

2. Launch:

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

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

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

Examples

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

$ python3 amicableNumbers.py 150

$ python3 amicableNumbers.py 300
[ 220  ,  284 ]

$ python3 amicableNumbers.py 2620
[ 220  ,  284 ]
[ 1184  ,  1210 ]
[ 2620  ,  2924 ]

Provide Feedback 👍

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

About

This script is ready to use script to takes an argument and calculates all amicable number pairs smaller than the inputted number.

Topics

Resources

License

Stars

Watchers

Forks

Languages