Himpunan
Sebuah library Python untuk operasi himpunan (Set Operations) yang diimplementasikan menggunakan magic methods Python.
✨ Fitur
- Membuat, menambah, dan mengurangi anggota himpunan
- Irisan
/ - Gabungan
+ - Selisih
- - Selisih Simetris
* - Komplemen (
komplement()) - Himpunan Kuasa (
abs()) - Produk Kartesius (
**) - Subset, Superset, dan Ekuivalen (
<=,>=,//)
📦 Instalasi
pip install afl2-himpunan==0.1.5
Contoh
from himpunan import Himpunan
S = Himpunan(1,2,3,4,5,6,7,8,9)
h1 = Himpunan(1, 2, 3)
h2 = Himpunan(3, 4, 5)
print(len(h1)) # Output: 3
print(3 in h1) # Output: True
print(h1 == h2) # Output: False
h1 += 4 # Menambah elemen 4 ke h1
print(h1) # Output: Himpunan([1, 2, 3, 4])
h3 = h1 / h2 # Irisan
print(h3) # Output: Himpunan([3, 4])
h4 = h1 + h2 # Gabungan
print(h4) # Output: Himpunan([1, 2, 3, 4, 5])
h5 = h1 - h2 # Selisih
print(h5) # Output: Himpunan([1, 2])
h6 = h1.Komplemen(S) # Komplemen
print(h6) # Output: Himpunan([5, 6, 7, 8, 9])
print(abs(h1)) # Output: 16
Metadata
Release files for afl2-himpunan 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| afl2_himpunan-0.1.5.tar.gz | 3.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| afl2_himpunan-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.7 kB
Release files / afl2_himpunan-0.1.5.tar.gz
| Download URL | afl2_himpunan-0.1.5.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd4d83e4b6599cfb1fd0bc2fe83a98025bc01dd1eb784d8d7878a1bdb020aec5
|
|
BLAKE2b-256 checksum How to use checksums |
1ebe892e03f052402f63997f0a509fc4907817f0464078c9a53a51411496ad59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.5
|
Release files / afl2_himpunan-0.1.5-py3-none-any.whl
| Download URL | afl2_himpunan-0.1.5-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dabd48d78c53f0b3887a01c9e987497e7e3a035a6d7cfa1cd8e9d21d19a08204
|
|
BLAKE2b-256 checksum How to use checksums |
5deb138636b74b096f893708f3cd51505e1354dc811d2203cac384c7525e9e3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.5
|
Security for afl2-himpunan 0.1.5
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.