

class    A_				:


    '''simple docstring'''






    def __init__(self					)       -> None:
        __UpperCAmelCase			   =     [0, 1]






    def        lowerCAmelCase_  (self       , lowercase__					)       -> list:
        if (difference := index - (len(self.sequence					) - 2)) >= 1:
            for _ in range(lowercase__					):
                self.sequence.append(self.sequence[-1] + self.sequence[-2]					)
        return self.sequence[:index]






def  __a    (				) ->       None:






    '''simple docstring'''
    print(
        '''Fibonacci Series Using Dynamic Programming\n'''    ,				'''Enter the index of the Fibonacci number you want to calculate '''    ,				'''in the prompt below. (To exit enter exit or Ctrl-C)\n'''    ,				sep=''''''    ,				)
    __UpperCAmelCase			   =     Fibonacci()

    while True:
        __UpperCAmelCase			   =     input('''>> ''' )
        if prompt in {"exit", "quit"}:
            break

        try:
            __UpperCAmelCase			   =     int(SCREAMING_SNAKE_CASE )
        except ValueError:
            print('''Enter a number or \'exit\'''' )
            continue

        print(fibonacci.get(SCREAMING_SNAKE_CASE ) )


if __name__ == "__main__":
       main()






def  __a    (				SCREAMING_SNAKE_CASE ) ->       float:






    '''simple docstring'''
    return -num if num < 0 else num


def  __a    (				SCREAMING_SNAKE_CASE ) ->       int:






    '''simple docstring'''
    if len(SCREAMING_SNAKE_CASE ) == 0:
        raise ValueError('''abs_min() arg is an empty sequence''' )
    __UpperCAmelCase			   =     x[0]
    for i in x:
        if abs_val(SCREAMING_SNAKE_CASE ) < abs_val(SCREAMING_SNAKE_CASE ):
            __UpperCAmelCase			   =     i
    return j


def  __a    (				SCREAMING_SNAKE_CASE ) ->       int:






    '''simple docstring'''
    if len(SCREAMING_SNAKE_CASE ) == 0:
        raise ValueError('''abs_max() arg is an empty sequence''' )
    __UpperCAmelCase			   =     x[0]
    for i in x:
        if abs(SCREAMING_SNAKE_CASE ) > abs(SCREAMING_SNAKE_CASE ):
            __UpperCAmelCase			   =     i
    return j


def  __a    (				SCREAMING_SNAKE_CASE ) ->       int:






    '''simple docstring'''
    if len(SCREAMING_SNAKE_CASE ) == 0:
        raise ValueError('''abs_max_sort() arg is an empty sequence''' )
    return sorted(SCREAMING_SNAKE_CASE    ,				key=SCREAMING_SNAKE_CASE )[-1]


def  __a    (				) ->       Union[str, Any]:






    '''simple docstring'''
    assert abs_val(0 ) == 0
    assert abs_val(3_4 ) == 3_4
    assert abs_val(-1_0_0_0_0_0_0_0_0_0_0_0 ) == 1_0_0_0_0_0_0_0_0_0_0_0

    __UpperCAmelCase			   =     [-3, -1, 2, -1_1]
    assert abs_max(SCREAMING_SNAKE_CASE ) == -1_1
    assert abs_max_sort(SCREAMING_SNAKE_CASE ) == -1_1
    assert abs_min(SCREAMING_SNAKE_CASE ) == -1


if __name__ == "__main__":
       import doctest

       doctest.testmod()

       test_abs_val()
       print(abs_val(-34))  # --> 34




