Skip to content

Instantly share code, notes, and snippets.

View Bravo555's full-sized avatar

Marcel Guzik Bravo555

View GitHub Profile
'''Converts a float to a list of an integer and the amount of decimal places'''
def float_to_custom_notation(fl):
power = 0
while(not fl.is_integer()):
fl = float(fl)
fl *= 10
power += 1
fl = float(fl)
return{int(fl), power}