Last active
May 17, 2020 17:42
-
-
Save and-semakin/6080c25e106dedcecb0326aa4514b738 to your computer and use it in GitHub Desktop.
Linters article examples: https://semakin.dev/2020/05/python_linters/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import * | |
import itertools | |
def CalculateSquareRoot (Number ): | |
return sqrt(Number ) | |
def append_item(item, l=[]): | |
l.append(item) | |
return l | |
while True: | |
try: | |
your_number=float(input('Enter your number: ')) | |
print("Square root is:", CalculateSquareRoot(your_number)) | |
break | |
except: | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import sqrt | |
def calculate_square_root(number): | |
return sqrt(number) | |
def append_item(item, l=None): # noqa: E741 | |
if l is None: | |
l = [] # noqa | |
l.append(item) | |
return l | |
while True: | |
try: | |
your_number = float(input('Enter your number: ')) | |
print("Square root is:", calculate_square_root(your_number)) | |
break | |
except Exception: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment