A simple Python library for set operations (Himpunan) supporting fractions and decimals.
Project description
Himpunan - Group 1 - Discrete Mathematics
A simple Python library for performing set operations (Himpunan) — supports Fraction and Decimal types, built for Discrete Mathematics learning.
Installation
You can install this package from PyPI using pip:
pip install himpunan-group1-ucmakassar
Quick Start
from himpunan.himpunan import Himpunan
from fractions import Fraction
from decimal import Decimal
Create sets
A = Himpunan(1, 2, Fraction(1, 2), Decimal('3.5'))
B = Himpunan(2, 3, Fraction(3, 4))
print("Himpunan A:", A)
print("Himpunan B:", B)
Union
print("Gabungan (A ∪ B):", A + B)
Intersection
print("Irisan (A ∩ B):", A / B)
Difference
print("Selisih (A - B):", A - B)
Symmetric Difference
print("Selisih Simetris (A ⊕ B):", A * B)
Cartesian Product
print("Perkalian Kartesius (A × B):", A ** B)
Power Set
print("Himpunan Bagian (P(A)):", A.ListKuasa())
Example Output
A = Himpunan(1, 2)
B = Himpunan(2, 3)
print(A + B) # {1, 2, 3}
print(A / B) # {2}
print(A - B) # {1}
print(A * B) # {1, 3}
print(A ** B) # [(1, 2), (1, 3), (2, 2), (2, 3)]
Authors
Group 1:
Keihan Pradika Muzaki (0806022410011)
Michele Stevany Venda Dati (0806022410021)
Siti Amirah Nathania Fahreza (0806022410024)
Universitas Ciputra Surabaya (Kampus Kota Makassar)
📧 Email: mchlstvny@gmail.com
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
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
File details
Details for the file discretemath_himpunan_group1_ucmakassar-1.0.1.tar.gz.
File metadata
- Download URL: discretemath_himpunan_group1_ucmakassar-1.0.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71fb37066b8f362f5dc47e61b193211c1bcd2c651f5611cdc9685aebb162f94f
|
|
| MD5 |
5980624a9303e5f5631817aeeb2b874d
|
|
| BLAKE2b-256 |
7830074960dce12d2f1b6b6fe383c4346bb4bfa236607db53e3220aff513ee94
|
File details
Details for the file discretemath_himpunan_group1_ucmakassar-1.0.1-py3-none-any.whl.
File metadata
- Download URL: discretemath_himpunan_group1_ucmakassar-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4e89951b2b3f0c39c518f1cfd2eaa78c2b2c75d6de7bd7716924d955d7ce9af
|
|
| MD5 |
0c67b2c1c55d487678327a247fb36138
|
|
| BLAKE2b-256 |
72c3ce08d806fe7e8784c86285fb3440a0eab07c5e1df6310e1909d275a59145
|