Skip to main content

NumberTypes

Python Module to identify various types of Numbers Faster and Easier

  • Can Identify Numbers as Even, Odd etc
  • Find Total Occurence of a Specific type of number in a Given Range
  • All Funtions have thier own help descriptions
    and more

Installation

Using pip -

pip install numbertypes

Usage

To start using module numbertypes import it -

import numbertypes <or> import numbertypes as nt 

Functions

There are 2 types of Functions Defined in the module

  • Normal : take number(s) as input and return True if the belong to certain type.
  • Range Based : take a range as input and return the frequncy of such numbers which belong to a certain type.

List Of Normal Functions :

(not in any specific sequence)

  • even
  • odd
  • composite
  • prime
  • twin_prime
  • perfect_square
  • emirp
  • armstrong
  • factorion
  • palindrome
  • narcissistic
  • neon
  • spy
  • buzz
  • automorphic

List Of Range Based Functions :

(not in any specific sequence)

  • even_in_range
  • odd_in_range
  • prime_in_range
  • twin_prime_in_range
  • palindrome_in_range
  • factorion_in_range
  • composite_in_range
  • armstrong_in_range
  • narcissistic_in_range
  • neon_in_range
  • spy_in_range
  • emirp_in_range
  • perfect_square_in_range
  • buzz_in_range
  • automorphic_in_range

Normal Functions Usage

Common Syntax For all functions is

FunctionName(Number To Test)

All these Functions return True if the number passed as argument belongs to the group, else False.

Usage Example :

>>> even(9)
False
>>> odd(9)
True
>>> prime(13)
True

Range Based Functions Usage

Common Syntax For all functions is

FunctionName(starting=0,ending=0,shownumbers=False)

Both starting and ending have default values = 0 and shownumbers has default value = False. ending value is included in funtion calculations

shownumbers

when shownumbers is set to True (default False), functions will print all the numbers that belong to that group.

Usage Example :

>>> even_in_range(50)
25
>>> print("Total +",prime_in_range(69,420,True)
71
73
79
83
89
97
101
103
107
109
113
127
131
137
139
149
151
157
163
167
173
179
181
191
193
197
199
211
223
227
229
233
239
241
251
257
263
269
271
277
281
283
293
307
311
313
317
331
337
347
349
353
359
367
373
379
383
389
397
401
409
419
Total = 62

Seeking Help

if you need help about any function type help(<function name>) for help related to that function.

Try On Your Own And Explore the Various Types OF Numbers....

Metadata

Release files for NumberTypes 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for NumberTypes 0.1
File Size Uploaded Provenance Actions
NumberTypes-0.1.tar.gz 4.0 kB Without provenance Details for NumberTypes-0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for NumberTypes 0.1
File Interpreter ABI Platform Actions
NumberTypes-0.1-py3-none-any.whl Python 3 none any Details for NumberTypes-0.1-py3-none-any.whl

Total release size: 7.7 kB

Release files / NumberTypes-0.1.tar.gz

Download URL NumberTypes-0.1.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d29a44d06a454620a4d1d4a733c34ef79125c37a7c518fe798bd03de03d339e5
BLAKE2b-256 checksum
How to use checksums
59bfe06ca7d12baf32aaf63d91fb9d2607afb64fc4142a2177365a79f299ae07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

Release files / NumberTypes-0.1-py3-none-any.whl

Download URL NumberTypes-0.1-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
163c896e02ceb24744e8978cf80b8f3dc42b90a8ad96e8c41e6de02cdaa81a12
BLAKE2b-256 checksum
How to use checksums
a9a44221b7573a7534a07cb832618e6b6860a687cf2f2661ca90d01918103288
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

Security for NumberTypes 0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page