가위바위보 프로그램
Project description
rsp
파이썬 가위바위보 라이브러리
가위바위보 기능을 파이썬에서 라이브러리로 이용할 수 있도록 개발되었습니다.
기능
상수
Hand
가위바위보 수 타입
ROCK가위바위보 중 '바위' 수를 의미한다SCISSORS가위바위보 중 '가위' 수를 의미한다PAPER가위바위보 중 '보' 수를 의미한다
Language
변환 가능한 언어
KOREAN한국어 (기본값)MGB한국어 (묵찌빠)ENGLISH영어JAPANESE일본어CHINESE중국어
함수
is_a_winning_b(a: Hand, b: Hand) -> bool
a가 b를 이기는 수인지 확인하는 함수
is_a_losing_b(a: Hand, b: Hand) -> bool
a가 b를 지는 수인지 확인하는 함수
is_a_equal_b(a: Hand, b: Hand) -> bool
a와 b가 비겼는지 확인하는 함수
stringify(hand: Hand, language: Language) -> str
hand를 language 언어로 변환하여 출력해주는 함수
hand_convert(string: str) -> Hand
사용자 입력을 Hand 타입으로 바꿔주는 함수
random_choice() -> Hand
ROCK, SCISSORS, PAPER중 하나를 랜덤으로 골라서 출력하는 함수
probability(pro: float)
random_choice_probability 함수의 확률을 결정하는 함수
random_choice_probability(a: Hand) -> Hand
a의 확률에 가중치를 부여하여 랜덤으로 골라 출력하는 함수
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 sch_ossc_rsp-1.1.0.tar.gz.
File metadata
- Download URL: sch_ossc_rsp-1.1.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab1ce27cb0cca1b0e29203d9a79caab47da058e4f3fa59482caea9cd4e6e0053
|
|
| MD5 |
e15ee5dece52676d9d6a147e9ca30977
|
|
| BLAKE2b-256 |
4e15fbc61fb55e91ccb0d0c7d55a4cfb548585803c78fff2a346d8e5882a410b
|
File details
Details for the file sch_ossc_rsp-1.1.0-py3-none-any.whl.
File metadata
- Download URL: sch_ossc_rsp-1.1.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ed5c552009941fd93fdc73814c0da07b0f411a1dfabd79b3e89f2080295d0e7
|
|
| MD5 |
389f1ea3063311e6b1e90f3aef830910
|
|
| BLAKE2b-256 |
0262be1ec9343cfb79106330e12b8f50a148b0df6c72c67d0e0d1890668f6dc6
|