

from __future__ import annotations







def       snake_case__    (       lowerCAmelCase_,   lowerCAmelCase_,   lowerCAmelCase_,   ):





     """simple docstring"""







     if not all((nth_term, start_term_a, common_ratio_r)      ):
          return []
     SCREAMING_SNAKE_CASE										=[]
     SCREAMING_SNAKE_CASE										=1
     SCREAMING_SNAKE_CASE										=common_ratio_r
     for _ in range(int(lowerCAmelCase_      )      ):
          if not series:
               series.append(lowerCAmelCase_      )
          else:
               power += 1
               series.append(float(start_term_a * multiple      )      )
               SCREAMING_SNAKE_CASE										=pow(float(lowerCAmelCase_      ),   lowerCAmelCase_      )
     return series


if __name__ == "__main__":
 import doctest

 doctest.testmod()

 _lowerCamelCase								=float(input("Enter the last number (n term) of the Geometric Series"))
 _lowerCamelCase								=float(input("Enter the starting term (a) of the Geometric Series"))
 _lowerCamelCase								=float(
     input("Enter the common ratio between two terms (r) of the Geometric Series")
 )
 print("Formula of Geometric Series => a + ar + ar^2 ... +ar^n")
 print(geometric_series(nth_term, start_term_a, common_ratio_r))




def       snake_case__    (       lowerCAmelCase_,   lowerCAmelCase_,   lowerCAmelCase_      ):





     """simple docstring"""







     if power < 0:
          return -1
     base %= mod
     SCREAMING_SNAKE_CASE										=1

     while power > 0:
          if power & 1:
               SCREAMING_SNAKE_CASE										=(result * base) % mod
          SCREAMING_SNAKE_CASE										=power >> 1
          SCREAMING_SNAKE_CASE										=(base * base) % mod

     return result







def       snake_case__    (       ):





     """simple docstring"""







     print(modular_exponential(3,   200,   13      )      )


if __name__ == "__main__":
 import doctest

 doctest.testmod()

 main()

