


"""simple docstring"""


from __future__ import annotations

import math




def 	snake_case		(  UpperCamelCase__							:    int     ) ->   list[int]:

      if num <= 0:
            lowerCamelCase       :       Union[str, Any]   =						F'{num}: Invalid input, please enter a positive integer.'
            raise ValueError(_lowerCamelCase     )

      lowerCamelCase       :       Optional[Any]   =						[True] * (num + 1)
      lowerCamelCase       :       Union[str, Any]   =						[]
      lowerCamelCase       :       List[str]   =						2
      lowerCamelCase       :       List[str]   =						int(math.sqrt(_lowerCamelCase     )     )

      while start <= end:
            # If start is a prime
            if sieve[start] is True:
                  prime.append(_lowerCamelCase     )

                  # Set multiples of start be False
                  for i in range(start * start      ,					num + 1      ,					_lowerCamelCase     ):
                        if sieve[i] is True:
                              lowerCamelCase       :       Tuple   =						False

            start += 1

      for j in range(end + 1      ,					num + 1     ):
            if sieve[j] is True:
                  prime.append(_lowerCamelCase     )

      return prime


if __name__ == "__main__":
    print(prime_sieve(int(input('Enter a positive integer: ').strip())))












"""simple docstring"""





from sympy import diff, lambdify, symbols
from sympy.functions import *  # noqa: F403







def 	lowerCamelCase__			(				_lowerCamelCase			:						str						,							_lowerCamelCase			:						complex						,							_lowerCamelCase			:						str = "x"						,							_lowerCamelCase			:						float = 10**-10						,							_lowerCamelCase			:						int = 1						,							) ->							complex:
  lowerCamelCase_       	=		symbols(_lowerCamelCase					)
  lowerCamelCase_       	=		lambdify(_lowerCamelCase						,							_lowerCamelCase					)
  lowerCamelCase_       	=		lambdify(_lowerCamelCase						,							diff(_lowerCamelCase						,							_lowerCamelCase					)					)

  lowerCamelCase_       	=		starting_point

  while True:
    if diff_function(_lowerCamelCase					) != 0:
      lowerCamelCase_       	=		prev_guess - multiplicity * func(_lowerCamelCase					) / diff_function(
          _lowerCamelCase					)
    else:
      raise ZeroDivisionError('Could not find root'					) from None

    # Precision is checked by comparing the difference of consecutive guesses
    if abs(next_guess - prev_guess					) < precision:
      return next_guess

    lowerCamelCase_       	=		next_guess


# 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
  # Find fourth Root of 5
  print(F'''The root of x**4 - 5 = 0 is {newton_raphson('x**4 -5', 0.4 +5j)}''')

  # Find value of e
  print(
      '''The root of log(y) - 1 = 0 is ''',
      F'''{newton_raphson('log(y) - 1', 2, variable='y')}''',
  )

  # Exponential Roots
  print(
      '''The root of exp(x) - 1 = 0 is''',
      F'''{newton_raphson('exp(x) - 1', 10, precision=0.005)}''',
  )

  # Find root of cos(x)
  print(F'''The root of cos(x) = 0 is {newton_raphson('cos(x)', 0)}''')




