def p_series(nth_term power):
          if nth_term == "":
              return nth_term
          nth_term = int(nth_term)
          power = int(power)
          series = []
          for temp in range(int(nth_term)):
              series.append(f"1/{pow(temp + 1, int(power))}" if series else 1)
          return series
      
      Python language logo

      P Series

      Python
      PSeries
      HGV Public Cookbook

      Function to return P series.

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.