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

      Harmonic Series

      Python
      HarmonicSeries
      HGV Public Cookbook

      Function to return Harmonic series.

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.