Given a binary number convert it to hexadecimal. Sample Testcase : INPUT 1100100 OUTPUT 64 binary_string = "1100100" decimal_representation = int(binary_string, 2) hexadecimal_string = hex(decimal_representation) print(hexadecimal_string)
Is the approach correct please help me out