





'''simple docstring'''




from PIL import Image






def 			_lowerCAmelCase     (    __snake_case    :					Image					,				__snake_case    :					float     )	->	Image:

     def brightness(__snake_case    :					int     ) -> 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(__snake_case     )


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






'''simple docstring'''




def 			_lowerCAmelCase     (    __snake_case    :					int     )	->	bool:
     return sum(i for i in range(1					,				number // 2 + 1     ) if number % i == 0     ) == number


if __name__ == "__main__":
  print('''Program to check whether a number is a Perfect number or not...''')
  lowercase__       : int         =       int(input('''Enter number: ''').strip())
  print(f"""{number} is {"" if perfect(number) else "not "}a Perfect Number.""")