python3
print(bin(eval("512.125")))
Traceback (most recent call last): File "source_file.py", line 1, in <module> print(bin(eval("512.125"))) TypeError: 'float' object cannot be interpreted as an integer
python3
print(hex(eval("512.125")))
Traceback (most recent call last): File "source_file.py", line 1, in <module> print(hex(eval("512.125"))) TypeError: 'float' object cannot be interpreted as an integer