Erwartete zwei leere Zeilen pep8 Warnung in Python

Ich benutze den VIM-Editor als Python-IDE. Im Folgenden finden Sie ein einfaches Python-Programm zum Berechnen der Quadratwurzel einer Zahl:

import cmath
def sqrt():
    try:
        num = int(input("Enter the number : "))
        if num >= 0:
            main(num)
        else:
            complex(num)
    except:
        print("OOPS..!!Something went wrong, try again")
        sqrt()
    return

def main(num):
    squareRoot = num**(1/2)
    print("The square Root of ", num, " is ", squareRoot)
    return

def complex(num):
    ans = cmath.sqrt(num)
    print("The Square root if ", num, " is ", ans)
    return

sqrt()

Und die Warnungen lauten:

1-square-root.py|2 col 1 C| E302 expected 2 blank lines, found 0 [pep8]
1-square-root.py|15 col 1 C| E302 expected 2 blank lines, found 1 [pep8]
1-square-root.py|21 col 1 C| E302 expected 2 blank lines, found 0 [pep8]

annst du bitte sagen, warum diese Warnungen komme

Antworten auf die Frage(10)

Ihre Antwort auf die Frage