Skip to main content

A Python package for various number-related operations.

Project description

sinum Package

Welcome to the sinum Package! This package provides a collection of Python modules for performing various operations related to numbers. Whether you need to check for prime numbers, generate Fibonacci sequences, or find factors, this package has you covered.

Installation

You can install the package using pip:

  • pip install sinum

Modules and Features

Explore the versatile features of this package, divided into separate modules:

  • Armstrong Numbers
  • Even Numbers
  • Odd Numbers
  • Factors
  • Fibonacci Numbers
  • Natural Numbers
  • Palindrome Numbers
  • Prime Numbers
  • Whole Numbers

Each module includes functions to perform specific number-related operations.

Armstrong Numbers

The armstrong module allows you to work with Armstrong numbers, which are numbers that are equal to the sum of their own digits raised to the power of the number of digits.

  • isArmstrong(number): Check if a number is an Armstrong number.
  • listArmstrong(limit): Generate a list of Armstrong numbers up to a specified limit.
  • listArmstrongBetween(start, end): Generate a list of Armstrong numbers within a specified range.

Even and Odd Numbers

The even and odd modules provide functions to work with even and odd numbers, respectively.

  • isEven(number): Check if a number is even.

  • listEven(limit): Generate a list of even numbers up to a specified limit.

  • listEvenBetween(start, end): Generate a list of even numbers within a specified range.

  • isOdd(number): Check if a number is odd.

  • listOdd(limit): Generate a list of odd numbers up to a specified limit.

  • listOddBetween(start, end): Generate a list of odd numbers within a specified range.

Factors

The factor module assists in finding factors of a given number.

  • isFactor(divider, number): Check if a number is a factor of another number.
  • factors(number): Generate a list of factors of a given number.

Fibonacci Numbers

The fibonacci module allows you to generate Fibonacci sequences.

  • listFibonacci(limit): Generate a list of Fibonacci numbers up to a specified limit.

Natural Numbers

The natural module deals with natural numbers (positive integers).

  • isNatural(number): Check if a number is a natural number.
  • listNatural(limit): Generate a list of natural numbers up to a specified limit.
  • listNaturalBetween(start, end): Generate a list of natural numbers within a specified range.

Palindrome Numbers

The palindrome module provides functions to work with palindrome numbers.

  • isPalindrome(number): Check if a number is a palindrome.
  • listPalindrome(limit): Generate a list of palindrome numbers up to a specified limit.
  • listPalindromeBetween(start, end): Generate a list of palindrome numbers within a specified range.

Prime Numbers

The primes module includes functions related to prime numbers.

  • isPrime(number): Check if a number is prime.
  • listPrimeBetween(start, end): Generate a list of prime numbers within a specified range.
  • listPrime(limit): Generate a list of prime numbers up to a specified limit.

Whole Numbers

The whole module deals with whole numbers (non-negative integers).

  • isWhole(number): Check if a number is a whole number.
  • listWhole(limit): Generate a list of whole numbers up to a specified limit.
  • listWholeBetween(start, end): Generate a list of whole numbers within a specified range.

Examples

Here's a quick example of how you can use the primes module to check if a number is prime:

    from sinum import primes
    
    num = 17
    if primes.isPrime(num):
        print(f"{num} is a prime number.")
    else:
        print(f"{num} is not a prime number.")

Explore the different modules and functions to perform a wide range of number-related operations!

Contributing

Contributions to this project are welcome! If you find any bugs or want to add new features, feel free to submit a pull request.

License

This project is licensed under the MIT License.

Created by Saurav Pandey

I hope you love using this package!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sinum-0.2.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sinum-0.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file sinum-0.2.tar.gz.

File metadata

  • Download URL: sinum-0.2.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.5

File hashes

Hashes for sinum-0.2.tar.gz
Algorithm Hash digest
SHA256 c6d43a8ebf1717d2133d26b8841580fe28ac414d54db6fee5a7833494fda66a4
MD5 de6fec33b85ce168f3b41057af582cd6
BLAKE2b-256 c85d664baccf6488105d43f63923f6d398b8e9c2250862d78242b0e4841ef01b

See more details on using hashes here.

File details

Details for the file sinum-0.2-py3-none-any.whl.

File metadata

  • Download URL: sinum-0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.5

File hashes

Hashes for sinum-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9ce3cb2aab992ac26065aff016ed348dedffa725efdbce52225e246d97585295
MD5 4da9f608ba360080df24339a0acc53c6
BLAKE2b-256 b5baa8abf77624ef3d96ec0556063c2f54109e7819aef301a8cc71c21e9f96ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page