red_ratio=int(factor/red_average(pic))
for pixel in pic:
red=media.get_red(pixel)
if red*red_ratio>=255:
new_red=255
elif red*red_ratio<255:
new_red=red*red_ratio
media.set_red(pixel,new_red)
''Adjust the pixels of that Picture so that the average red value of the
Picture is the same as the integer value provided.'''
i cant figure out why scale_red gives me 0 instead of 100