mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 17:34:49 +08:00
conversions/decimal_to_binary.py: Add type hints (#2001)
* A .py file to covert a base to any new base(2-18) * Update base_changer.py * Added type-hints. * Delete base_changer.py
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
"""Convert a Decimal Number to a Binary Number."""
|
"""Convert a Decimal Number to a Binary Number."""
|
||||||
|
|
||||||
|
|
||||||
def decimal_to_binary(num):
|
def decimal_to_binary(num: int) -> str:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Convert a Integer Decimal Number to a Binary Number as str.
|
Convert a Integer Decimal Number to a Binary Number as str.
|
||||||
|
Reference in New Issue
Block a user