GUVI
Back

Hexadecimal conversion using python got error?

Created 2 years ago
56 Views
2 Comments
RahulLokanathan
@RahulLokanathan
RahulLokanathan
@RahulLokanathanProfile is locked. Login

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

Comments (2)
Please login to comment.
 
Powered by habitate.io Habitate