मैं अजगर आईडीई के रूप में vim संपादक का उपयोग कर रहा में चेतावनी pep8, नीचे एक संख्या का वर्गमूल गणना करने के लिए एक सरल अजगर कार्यक्रम है: -उम्मीद दो रिक्त लाइनों अजगर
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()
और चेतावनी प्रकार हैं: -
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]
क्या आप कृपया बता सकते हैं कि ये चेतावनियां क्यों आ रही हैं?
https://www.python.org/dev/peps/pep-0008/#blank-lines – Jasper