Redefining built-in 'min'
7 minFloat = deg_float % 1 * 60
8 secFloat = minFloat % 1 * 60
9 deg = math.floor(deg_float)
10 min = math.floor(minFloat)11 sec = round(secFloat * 100)
12
13 deg = abs(deg) * 1
Description
Defining a local variable or function with the same name as a built-in object makes the built-in object unusable within the current scope and makes the code prone to bugs.
Bad practice
dict = {} # dict is a Python builtin!
for idx, student in enumerate(students):
dict[student] = idx
Preferred:
roll_number = {}
for idx, student in enumerate(students):
roll_number[student] = idx