

def 		_snake_case(       SCREAMING_SNAKE_CASE__     :      int )				-> int:





    '''simple docstring'''






    if not isinstance(SCREAMING_SNAKE_CASE__       ,     SCREAMING_SNAKE_CASE__ ):
        raise TypeError('recursive_lucas_number accepts only integer arguments.' )
    if n_th_number == 0:
        return 2
    if n_th_number == 1:
        return 1

    return recursive_lucas_number(n_th_number - 1 ) + recursive_lucas_number(
        n_th_number - 2 )
def 		_snake_case(       SCREAMING_SNAKE_CASE__     :      int )				-> int:





    '''simple docstring'''






    if not isinstance(SCREAMING_SNAKE_CASE__       ,     SCREAMING_SNAKE_CASE__ ):
        raise TypeError('dynamic_lucas_number accepts only integer arguments.' )
    A__ ,		A__        =  2, 1
    for _ in range(SCREAMING_SNAKE_CASE__ ):
        A__ ,		A__        =  b, a + b
    return a


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

     testmod()
     lowercase_									=    int(input("Enter the number of terms in lucas series:\n").strip())
     print("Using recursive function to calculate lucas series:")
     print(" ".join(str(recursive_lucas_number(i)) for i in range(n)))
     print("\nUsing dynamic function to calculate lucas series:")
     print(" ".join(str(dynamic_lucas_number(i)) for i in range(n)))




import math
import os

import cva
import numpy as np

lowercase_									=    255.0
def 		_snake_case(       SCREAMING_SNAKE_CASE__     :      float       ,     SCREAMING_SNAKE_CASE__     :      float )				-> float:





    '''simple docstring'''






    A__        =  np.mean((original - contrast) ** 2 )
    if mse == 0:
        return 100

    return 20 * math.logaa(PIXEL_MAX / math.sqrt(SCREAMING_SNAKE_CASE__ ) )
def 		_snake_case(       )				-> None:





    '''simple docstring'''






    A__        =  os.path.dirname(os.path.realpath(SCREAMING_SNAKE_CASE__ ) )
    # Loading images (original image and compressed image)
    A__        =  cva.imread(os.path.join(SCREAMING_SNAKE_CASE__       ,     'image_data/original_image.png' ) )
    A__        =  cva.imread(os.path.join(SCREAMING_SNAKE_CASE__       ,     'image_data/compressed_image.png' )       ,     1 )

    A__        =  cva.imread(os.path.join(SCREAMING_SNAKE_CASE__       ,     'image_data/PSNR-example-base.png' ) )
    A__        =  cva.imread(
        os.path.join(SCREAMING_SNAKE_CASE__       ,     'image_data/PSNR-example-comp-10.jpg' )       ,     1 )

    # Value expected: 29.73dB
    print('-- First Test --' )
    print(f'PSNR value is {peak_signal_to_noise_ratio(SCREAMING_SNAKE_CASE__       ,     SCREAMING_SNAKE_CASE__ )} dB' )

    # # Value expected: 31.53dB (Wikipedia Example)
    print('\n-- Second Test --' )
    print(f'PSNR value is {peak_signal_to_noise_ratio(SCREAMING_SNAKE_CASE__       ,     SCREAMING_SNAKE_CASE__ )} dB' )


if __name__ == "__main__":
     main()

