Create binaryToHexaFunction.py

Binary to Hexadecimal conversion function file
This commit is contained in:
helplessThor
2020-10-19 20:10:45 +05:30
committed by GitHub
parent d69c29b71b
commit 2449320082

View File

@@ -0,0 +1,11 @@
from .__init__ import *
def binaryToHexaFunc(max_dig=1000):
problem = ''
for i in range(random.randint(1, max_dig)):
temp = str(random.randint(0, 1))
problem += temp
solution = hex(int(problem))
return problem, solution