Skip to content

Commit

Permalink
Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Muna-S committed Jan 2, 2025
1 parent 11ae342 commit 06a02d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion solutions/binary_decimal_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def DecimalToBinary(decimal: int)-> str:
decimal = -decimal
return '-'+ DecimalToBinary(decimal)
if decimal == 0:
return 0
return '0'
binarynumber = ' '
while decimal > 0:
binarynumber = str(decimal % 2)+ binarynumber
Expand Down

0 comments on commit 06a02d9

Please sign in to comment.