Harmonic Series

    0

    0

    HARIGOVIND VALSAKUMAR

    PythonHarmonicSeries
    HGV Public Cookbook

    Function to return Harmonic series.

    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
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.