

SCREAMING_SNAKE_CASE_            = [
    (1000, 'M'),
    (900, 'CM'),
    (500, 'D'),
    (400, 'CD'),
    (100, 'C'),
    (90, 'XC'),
    (50, 'L'),
    (40, 'XL'),
    (10, 'X'),
    (9, 'IX'),
    (5, 'V'),
    (4, 'IV'),
    (1, 'I'),
]

def 							__SCREAMING_SNAKE_CASE							(			lowerCAmelCase:					str	)				->    int:
				_UpperCAmelCase    :						List[Any]							=      {"I": 1, "V": 5, "X": 10, "L": 50, "C": 100, "D": 500, "M": 1000}
				_UpperCAmelCase    :						List[str]							=      0
				_UpperCAmelCase    :						int							=      0
				while place < len(lowerCAmelCase	):
								if (place + 1 < len(lowerCAmelCase	)) and (vals[roman[place]] < vals[roman[place + 1]]):
												total += vals[roman[place + 1]] - vals[roman[place]]
												place += 2
								else:
												total += vals[roman[place]]
												place += 1
				return total

def 							__SCREAMING_SNAKE_CASE							(			lowerCAmelCase:					int	)				->    str:
				_UpperCAmelCase    :						str							=      []
				for arabic, roman in ROMAN:
								((_UpperCAmelCase)						,							(_UpperCAmelCase))    :						Optional[int]							=      divmod(lowerCAmelCase					, lowerCAmelCase	)
								result.append(roman * factor	)
								if number == 0:
												break
				return "".join(lowerCAmelCase	)


if __name__ == "__main__":
					import doctest

					doctest.testmod()





from __future__ import annotations

from decimal import Decimal
from math import *  # noqa: F403

from sympy import diff

def 							__SCREAMING_SNAKE_CASE							(			lowerCAmelCase:					str					, lowerCAmelCase:					float | Decimal					, lowerCAmelCase:					float = 10**-10	)				->    float:
				_UpperCAmelCase    :						Optional[int]							=      a
				while True:
								_UpperCAmelCase    :						Tuple							=      Decimal(lowerCAmelCase	) - (
								    Decimal(eval(lowerCAmelCase	)	) / Decimal(eval(str(diff(lowerCAmelCase	)	)	)	)  # noqa: S307
								)
								# This number dictates the accuracy of the answer
								if abs(eval(lowerCAmelCase	)	) < precision:  # noqa: S307
												return float(lowerCAmelCase	)


# Let's Execute
if __name__ == "__main__":
					# Find root of trigonometric function
					# Find value of pi
					print(F'''The root of sin(x) = 0 is {newton_raphson("sin(x)", 2)}''')
					# Find root of polynomial
					print(F'''The root of x**2 - 5*x + 2 = 0 is {newton_raphson("x**2 - 5*x + 2", 0.4)}''')
					# Find Square Root of 5
					print(F'''The root of log(x) - 1 = 0 is {newton_raphson("log(x) - 1", 2)}''')
					# Exponential Roots
					print(F'''The root of exp(x) - 1 = 0 is {newton_raphson("exp(x) - 1", 0)}''')


