pyrandtoys
v1.0.0
pyrandtoysは、確率ベースのおもちゃの機能を含むPythonモジュールです。
オフラインで動作し、Python 2と3の両方と互換性があります。
pip install pyrandtoys
import pyrandtoys
print(pyrandtoys.coin()) #there are many other toys in pyrandtoys similar to coin, check below
オプション:サイコロ<int>
デフォルト:サイコロ数= 1
戻りタイプ: <tuple>
dice(number_of_dice)
オプション:コインの数<int>
デフォルト:コインの数= 1
戻りタイプ: <tuple>
coin(number_of_coins)
オプション:カード数<int>
デフォルト:カード数= 1
戻りタイプ: <tuple>
card(number_of_cards)
オプション:アイテム数<int>
デフォルト:アイテム数= 1
戻りタイプ: <tuple>
dreidel(number_of_dreis)
cat(number_of_cats)
switch(number_of_switches)
必須:下限および上限<int>
デフォルト:下限= 0
戻りタイプ: <int>
spinner(lowerLimit, upperLimit)
戻りタイプ: <tuple>
デフォルト:おもちゃの数= 0
おもちゃの組み合わせを使用したい場合は、
必須:おもちゃの名前<tuple>, <list>, <str>
combi("coin", "switch")
combi(("switch", "cat", "dice"))
combi(["dreidel", "coin", "coin", "cat"])
xランダムおもちゃの組み合わせのために、
combi(x)