



from PIL import Image




def 	UpperCAmelCase     (		A	:						Image     ,				A	:						float       ):

		'''simple docstring'''


		def brightness(A	:						int       ) -> float:
				return 128 + level + (c - 128)

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


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







"""simple docstring"""





import os




def 	UpperCAmelCase     (		):

		'''simple docstring'''


		_UpperCAmelCase							 =		os.path.join(os.path.dirname(A       )     ,				'num.txt'       )
		with open(A       ) as file_hand:
				return str(sum(int(A       ) for line in file_hand       )       )[:10]


if __name__ == "__main__":
					print(solution())


