





def    A_(			A   ):
	try:
		UpperCAmelCase_								=     float(lowerCAmelCase__   )
	except ValueError:
		raise ValueError("""Please enter a valid number"""   )
	UpperCAmelCase_								=     decimal - int(lowerCAmelCase__   )
	if fractional_part == 0:
		return int(lowerCAmelCase__   ), 1
	else:
		UpperCAmelCase_								=     len(str(lowerCAmelCase__   ).split("""."""   )[1]   )
		UpperCAmelCase_								=     int(decimal * (10**number_of_frac_digits)   )
		UpperCAmelCase_								=     10**number_of_frac_digits
		UpperCAmelCase_						,	UpperCAmelCase_								=     denominator, numerator
		while True:
			UpperCAmelCase_								=     dividend % divisor
			if remainder == 0:
				break
			UpperCAmelCase_						,	UpperCAmelCase_								=     divisor, remainder
		UpperCAmelCase_						,	UpperCAmelCase_								=     numerator / divisor, denominator / divisor
		return int(lowerCAmelCase__   ), int(lowerCAmelCase__   )


if __name__ == "__main__":
				print(f"{decimal_to_fraction(2) = }")
				print(f"{decimal_to_fraction(89.0) = }")
				print(f"{decimal_to_fraction('67') = }")
				print(f"{decimal_to_fraction('45.0') = }")
				print(f"{decimal_to_fraction(1.5) = }")
				print(f"{decimal_to_fraction('6.25') = }")
				print(f"{decimal_to_fraction('78td') = }")









from __future__ import annotations




def    A_(			A   ):
	if not nums:
		raise ValueError("""List is empty"""   )
	return sum(A   ) / len(A   )


if __name__ == "__main__":
				import doctest

				doctest.testmod()


