

'''simple docstring'''







from PIL import Image
def       UpperCAmelCase__    (      UpperCAmelCase__,       UpperCAmelCase__				)			->			Image:




       def brightness(UpperCAmelCase__				) -> float:
              return 1_28 + level + (c - 1_28)

       if not -255.0 <= level <= 255.0:
              raise ValueError("""level must be between -255.0 (black) and 255.0 (white)"""				)
       return img.point(__A				)


if __name__ == "__main__":
      # Load image
      with Image.open('''image_data/lena.jpg''') as img:
            # Change brightness to 100
            __lowerCamelCase		       =    change_brightness(img, 100)
            brigt_img.save('''image_data/lena_brightness.png''', format='''png''')



'''simple docstring'''







def       UpperCAmelCase__    (      UpperCAmelCase__				)			->			int:
       assert (
           isinstance(UpperCAmelCase__,       UpperCAmelCase__				) and number_of_steps > 0
       ), F'''number_of_steps needs to be positive integer, your input {number_of_steps}'''
       if number_of_steps == 1:
              return 1
       A_					,			A_						=      1, 1
       for _ in range(number_of_steps - 1				):
              A_					,			A_						=      current + previous, current
       return current


if __name__ == "__main__":
      import doctest

      doctest.testmod()
