From b6fee20050e698d3e6b908de7892fe8c19b6e7bb Mon Sep 17 00:00:00 2001 From: Muna Sattouf Date: Sat, 11 Jan 2025 20:34:58 +0200 Subject: [PATCH] changed to snake case --- solutions/binary_decimal_conversion.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/solutions/binary_decimal_conversion.py b/solutions/binary_decimal_conversion.py index d8ffe214e..7f329c0e7 100644 --- a/solutions/binary_decimal_conversion.py +++ b/solutions/binary_decimal_conversion.py @@ -3,7 +3,7 @@ Created by Muna Sattouf on 29/12/2024 Completed on 1/1/2025 """ -def DecimalToBinary(decimal: int)-> str: +def decimal_to_binary(decimal: int)-> str: """ This function takes a decimal number from command line as paramter, and returns its binary representation. @@ -13,6 +13,7 @@ def DecimalToBinary(decimal: int)-> str: """ if not isinstance(decimal, int): + raise ValueError("Input must be an integer") if decimal < 0: decimal = -decimal