Contents
#find the minimum absolute value of a list

data = [6, 1, -10, -7, 0, 6, -9, 7, 1, -2]

lowest = 1e100 #set to a very big number (a "googol": 1x10^100)

#iterate through the data
for d in data:
    print("d=", d)
    #if it's positive and less than the lowest so far
    if d > 0 and d < lowest: 
        #replace the lowest so far with the current value
        lowest = d 
        print("lowest=", lowest)
    if d < 0:#if less than zero
        #negate 
        d = -d
        if d < lowest:
            lowest = d
        print("lowest=", lowest)
            
print(lowest)
d= 6
lowest= 6
d= 1
lowest= 1
d= -10
lowest= 1
d= -7
lowest= 1
d= 0
d= 6
d= -9
lowest= 1
d= 7
d= 1
d= -2
lowest= 1
1