






"""simple docstring"""






SCREAMING_SNAKE_CASE						:						Dict					   =       {
    '''meter''': '''m''',
    '''kilometer''': '''km''',
    '''megametre''': '''Mm''',
    '''gigametre''': '''Gm''',
    '''terametre''': '''Tm''',
    '''petametre''': '''Pm''',
    '''exametre''': '''Em''',
    '''zettametre''': '''Zm''',
    '''yottametre''': '''Ym''',
}
# Exponent of the factor(meter)
SCREAMING_SNAKE_CASE						:						List[Any]					   =       {
    '''m''': 0,
    '''km''': 3,
    '''Mm''': 6,
    '''Gm''': 9,
    '''Tm''': 12,
    '''Pm''': 15,
    '''Em''': 18,
    '''Zm''': 21,
    '''Ym''': 24,
}



def  __lowerCamelCase					(					lowerCAmelCase__       ,lowerCAmelCase__       ,lowerCAmelCase__				):
    A__							 =       from_type.lower().strip('s'				)
    A__							 =       to_type.lower().strip('s'				)

    A__							 =       UNIT_SYMBOL.get(lowerCAmelCase__       ,lowerCAmelCase__				)
    A__							 =       UNIT_SYMBOL.get(lowerCAmelCase__       ,lowerCAmelCase__				)

    if from_sanitized not in METRIC_CONVERSION:
        A__							 =       (
            f'''Invalid \'from_type\' value: {from_type!r}.\n'''
            f'''Conversion abbreviations are: {', '.join(lowerCAmelCase__				)}'''
        )
        raise ValueError(lowerCAmelCase__				)
    if to_sanitized not in METRIC_CONVERSION:
        A__							 =       (
            f'''Invalid \'to_type\' value: {to_type!r}.\n'''
            f'''Conversion abbreviations are: {', '.join(lowerCAmelCase__				)}'''
        )
        raise ValueError(lowerCAmelCase__				)
    A__							 =       METRIC_CONVERSION[from_sanitized]
    A__							 =       METRIC_CONVERSION[to_sanitized]
    A__							 =       1

    if from_exponent > to_exponent:
        A__							 =       from_exponent - to_exponent
    else:
        A__							 =       -(to_exponent - from_exponent)

    return value * pow(10       ,lowerCAmelCase__				)


if __name__ == "__main__":
     from doctest import testmod

     testmod()










"""simple docstring"""






from math import factorial, pi



def  __lowerCamelCase					(					lowerCAmelCase__       ,lowerCAmelCase__ = 30				):

				if not isinstance(lowerCAmelCase__       ,(int, float)				):
								raise ValueError('maclaurin_sin() requires either an int or float for theta'				)

				if not isinstance(lowerCAmelCase__       ,lowerCAmelCase__				) or accuracy <= 0:
								raise ValueError('maclaurin_sin() requires a positive int for accuracy'				)

				A__							 =       float(lowerCAmelCase__				)
				A__							 =       theta // (2 * pi)
				theta -= 2 * div * pi
				return sum(
				    (-1) ** r * theta ** (2 * r + 1) / factorial(2 * r + 1				) for r in range(lowerCAmelCase__				)				)



def  __lowerCamelCase					(					lowerCAmelCase__       ,lowerCAmelCase__ = 30				):

				if not isinstance(lowerCAmelCase__       ,(int, float)				):
								raise ValueError('maclaurin_cos() requires either an int or float for theta'				)

				if not isinstance(lowerCAmelCase__       ,lowerCAmelCase__				) or accuracy <= 0:
								raise ValueError('maclaurin_cos() requires a positive int for accuracy'				)

				A__							 =       float(lowerCAmelCase__				)
				A__							 =       theta // (2 * pi)
				theta -= 2 * div * pi
				return sum((-1) ** r * theta ** (2 * r) / factorial(2 * r				) for r in range(lowerCAmelCase__				)				)


if __name__ == "__main__":
					import doctest

					doctest.testmod()

					print(maclaurin_sin(10))
					print(maclaurin_sin(-10))
					print(maclaurin_sin(10, 15))
					print(maclaurin_sin(-10, 15))

					print(maclaurin_cos(5))
					print(maclaurin_cos(-5))
					print(maclaurin_cos(10, 15))
					print(maclaurin_cos(-10, 15))


