From 79eb0337264da8b6d78cf2ceb91600156d87ae73 Mon Sep 17 00:00:00 2001 From: Navanit Nandakumar Date: Sat, 12 Aug 2023 07:38:03 +0530 Subject: [PATCH] Updated octal_to_binary.py Fixed whitespaces in blank lines. --- conversions/octal_to_binary.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/conversions/octal_to_binary.py b/conversions/octal_to_binary.py index 9f868c46e..d2deee8a8 100644 --- a/conversions/octal_to_binary.py +++ b/conversions/octal_to_binary.py @@ -6,7 +6,6 @@ def octal_to_binary(octal): decimal += (octal % 10) * pow(8, power) octal //= 10 power += 1 - # Converting Decimal to Binary binary = 0 digit_place = 1 @@ -14,10 +13,7 @@ def octal_to_binary(octal): binary += (decimal % 2) * digit_place decimal //= 2 digit_place *= 10 - return binary - - octal_number = int(input("Enter octal number: ")) binary_number = octal_to_binary(octal_number) print(f"The binary equivalent of {octal_number} is {binary_number}")