Skip to main content

Module to extend python

Project description

#EXTENPIED MODULE V0.1.4 (WIP) #Module to extend python Features: fact() function (factorial)

is_palindrome() function

Logic elements (XOR, NOR, XNOR, NAND)

"arabic" variable is shorter now

#HOW 2 USE

import module first. For example:

import extendpied

If you want to make name shorter, do:

import extendpied as expied

OR even shorter:

import extenpied as xpd

reverse() - reverses a string. Example:

print(extenpied.reverse("Hi!!"))

info() - information about variable. Example:

a = 5

extenpied.info(a)

piedfeat() - information about extenpied. Version, features, etc.

randlatin() - randomizes symbol from latin alphabet. Example:

print(extenpied.randlatin())

prints random latin letter

randld() - does the same as randlatin(), but digits are included

print(extenpied.randld())

randall() - get random latin letter, digit or special symbol (like ~ or % etc.)

print(extenpied.randall())

nextwo - returns exponent of two

print(extenpied.nextwo(8)) -> 256 (2^8 is 256)

randsort - returns a string with randomized letters (letters can repeat)

print(extenpied.randsort("Hello")) -> something like "ohleH" or "lHolo"

iseven - checking if number is even

print(extenpied.iseven(7)) -> False

isodd - checking if number is odd

print(extenpied.isodd(3)) -> True

shuffle - returns a string with randomized letters (letters cannot repeat)

print(extenpied.shuffle("Hello")) -> something like "Hloel" or "eolHl"

is_palindrome - checks if a string is a palindrome

print(extenpied.is_palindrome("racecar")) -> True

#MATHEMATICAL FUNCTIONS

add - adds a to b

print(extenpied.add(1, 3)) -> 4

sub - substract b from a

print(extenpied.sub(6, 2)) -> 4

mul - multiplies a by b

print(extenpied.mul(3, 4)) -> 12

div - divides a by b

print(extenpied.div(8, 2) -> 4

exp - raises a to the exponent of b

print(extenpied.exp(4, 3)) -> 64

root - extracts the root a of b

print(extenpied.root(3, 27)) -> 3

print(extenpied.root(4, 16)) -> 2

fact - returns factorial of n

print(extenpied.fact(4)) -> 24

#LOGICAL ELEMENTS

AND, OR, NOT are already in python, more upcoming

xor - returns True if a != b

print(extenpied.xor(False, True)) -> True

nor - returns False if a or b is True

print(extenpied.nor(True, False) -> False

xnor - returns True if a == b

print(extenpied.xnor(True, True)) -> True

nand - returns False if a and b are True

print(extenpied.nand(False, False)) -> True

#LICENSE

MIT license. Do anything, just mention the author (Idose114)

#INSTALLATION

Enter "pip install extenpied" to install

Goodbye and be a good boy XD

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

extenpied-0.1.4.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

extenpied-0.1.4-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file extenpied-0.1.4.tar.gz.

File metadata

  • Download URL: extenpied-0.1.4.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for extenpied-0.1.4.tar.gz
Algorithm Hash digest
SHA256 4f4d6067b786d67ef196f1f73d96aa885adaa81d840245909e75d4325d420583
MD5 2cb9f3023ea481654fb4a6909c9b12cf
BLAKE2b-256 7cee1123ed51b801fc4c979e55c599a40ef4829b998b46429ebd64e04fd1d082

See more details on using hashes here.

File details

Details for the file extenpied-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: extenpied-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for extenpied-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b9ce41236af7070cecbf9d84d16db40bd68e6aed8700037ae5b2db7879cb811d
MD5 c6e575886c54bbe12e0f1d46077a1f49
BLAKE2b-256 ceb6fed659f102754dcc5ea9609e8e88f1c050f7a785dd7ff51633e6a589d228

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