A comprehensive Python math utility library for interviews and competitive programming.
Project description
infe
A professional, comprehensive Python math and string utility library for interviews, competitive programming, and educational purposes.
Features
🔢 Basic Operations
is_even,is_odd,is_positive,is_negativeswap,largest_of_three,sum_first_nfactorial,power,multiplication_tablesum_even_range,sum_odd_range
🔢 Digit-Based Programs
count_digits,reverse_number,sum_digits,product_digitsis_palindrome_number,is_disarium,is_neon,is_spyis_duck,is_harshad,max_digit,min_digitcount_eo_digits(Even/Odd count),sum_even_digits,sum_odd_digits
🔢 Primes & Factors
is_prime,primes_in_range,sum_primes,prime_factorsgcd,lcm,are_coprime,is_composite
🔢 Special Numbers
is_armstrong,is_perfect,is_abundant,fibonacci_seriesis_strong(formerly Krishnamurthy),is_happy,is_magicis_perfect_square,is_perfect_cube,is_triangular
🔤 String Utilities
count_vc(Vowels/Consonants),no_spaces,char_freqdup_chars,is_anagram,first_non_rep,first_rep
📋 List/Array Utilities
max_list,second_max,unique(Remove duplicates)rotate_left,rotate_right
Installation
pip install infe
Usage
import infe
# Check for a Strong (Krishnamurthy) number
print(infe.is_strong(145)) # True
# String operations
v, c = infe.count_vc("Hello World")
print(f"Vowels: {v}, Consonants: {c}")
# List operations
my_list = [10, 20, 30, 20, 10]
print(infe.unique(my_list)) # [10, 20, 30]
Running Tests
pip install pytest
pytest
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
infe-0.1.1.tar.gz
(7.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
infe-0.1.1-py3-none-any.whl
(8.1 kB
view details)
File details
Details for the file infe-0.1.1.tar.gz.
File metadata
- Download URL: infe-0.1.1.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b97e388ac4e21906dff2cb6a17883fd3ec16577286f0958a399fb509d73502a
|
|
| MD5 |
2ed5206f80325a8e6650271f3389d2df
|
|
| BLAKE2b-256 |
dfbcad2b917c29c0d99d785918662e9db630a80d72806157acb2d9646cf04649
|
File details
Details for the file infe-0.1.1-py3-none-any.whl.
File metadata
- Download URL: infe-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53af8254faca35064feb4138f7970c2f3d6ce24502b54d681588deef972e2ac2
|
|
| MD5 |
93632cd3117c25369be60dee9e2194d4
|
|
| BLAKE2b-256 |
378993fc9445d4fb387190acf1fa1f8c9581a950b87dd6b2b45d29fa967ff1d7
|