From 58ae8261d9ae17dd13c67a451e5471705dd90e24 Mon Sep 17 00:00:00 2001 From: Ayush Pandey Date: Sat, 11 Jul 2026 01:42:06 +0530 Subject: [PATCH] feat: add decimal_to_binary tool --- tools/decimal_to_binary.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tools/decimal_to_binary.py diff --git a/tools/decimal_to_binary.py b/tools/decimal_to_binary.py new file mode 100644 index 0000000..64094ac --- /dev/null +++ b/tools/decimal_to_binary.py @@ -0,0 +1,9 @@ +# tool: decimal_to_binary +# description: Converts a decimal integer to its binary string representation +# author: @Ayush-0918 +# example: decimal_to_binary "10" -> "1010" + + +def run(*args) -> str: + n = int(args[0]) + return bin(n)[2:]