cs-toolkit-ika

一個輕量級的資工基礎工具套件,提供二進位/十六進位轉換與常用數值統計函式。

Python 3.8+ v0.1.0 MIT License 零第三方依賴

安裝

pip install cs-toolkit-ika

使用範例

from cs_toolkit_ika import average, binary_to_hex, is_prime, median

binary_to_hex("101010")     # "2A"
average([1, 2, 3, 4])       # 2.5
median([3, 1, 2])           # 2
is_prime(17)                # True

提供的函式

類別函式
進位轉換binary_to_decimal、decimal_to_binary、binary_to_hex、hex_to_binary、decimal_to_hex、hex_to_decimal
數值統計average、median、is_prime

所有函式皆為純函式,有多種輸入驗證,方便入門課程練習與教材使用。