Skip to main content

Library random berbahasa Indonesia - wrapper untuk modul random Python

Project description

acak — Library Random Berbahasa Indonesia

acak adalah library Python yang membungkus modul standar random dengan antarmuka berbahasa Indonesia. Dibuat agar lebih mudah dipahami oleh developer Indonesia.

Instalasi

pip install acak

Atau langsung dari GitHub:

pip install git+https://github.com/annaqibz01/acak.git

Contoh Penggunaan

from acak import acak, acak_bulat, pilih, acak_urutkan, bibit

# Float acak 0.0 - 1.0
print(acak())              # 0.374...

# Integer acak antara 1 - 10
print(acak_bulat(1, 10))   # 7

# Pilih satu elemen
print(pilih(["apel", "mangga", "jeruk"]))  # "mangga"

# Set seed (bibit)
bibit(42)
print(acak_bulat(1, 100))  # 82

Daftar Fungsi

Fungsi Padanan random Deskripsi
acak() random() Float 0.0 <= x < 1.0
acak_bulat(a, b) randint(a, b) Integer antara a dan b
acak_seragam(a, b) uniform(a, b) Float antara a dan b
pilih(urutan) choice(seq) Pilih satu elemen
pilih_banyak(urutan, jumlah) choices(seq, k=n) Pilih banyak (dengan pengembalian)
contoh(populasi, jumlah) sample(pop, k) Sample tanpa pengembalian
acak_urutkan(urutan) shuffle(seq) Acak urutan in-place
bibit(n) seed(n) Set seed

Test

python -m pytest src/acak/tests/test_acak.py -v

Lisensi

MIT © 2025 annaqibz01


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

acak-0.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

acak-0.1.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file acak-0.1.0.tar.gz.

File metadata

  • Download URL: acak-0.1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for acak-0.1.0.tar.gz
Algorithm Hash digest
SHA256 80c2b379dffcbaa23dea0eeab8a1ccb7a5cd66f4fcdc6ea83e3cdbe16d02531e
MD5 a5123d211d367a51e3100628e600038c
BLAKE2b-256 37ab2a1887120e7f358cf4a97f257dfe9ef7b38baa8407961b060b919b9e8db2

See more details on using hashes here.

File details

Details for the file acak-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: acak-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for acak-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71dd0bbfa4b9444c6254bc421bc4e545bd25a73a90d8b64652c5b8f1265d9ce4
MD5 7e4009dda5a8b5fdf493e49d13bd8f15
BLAKE2b-256 d40ace96305181d432d08e83651064c7b8b0ffd792cb154cc825c099cbb8ae2e

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