a = 3
def divide509_by(x):
return 509 / x11 Exception handling
լուսանկարի հղումը, Հեղինակ՝ Artur Adilkhanian
Song reference - ToDo
🎦 Տեսադասեր + լրացուցիչ (ToDo)
ToDo 1. Տեսություն 2025
2. Տեսություն 2023 (ToDo)
3. Գործնական 2025
4. Գործնական 2023 (ToDo)
5. Որոշ տնայինների լուծումներ (ToDo)
Google Forms ToDo
📚 Նյութը
Բովանդակություն
- Ինչի՞ համար են պետք ընդհանրապես
- try / except
- try-except specific error(s)
- handling multiple with one statement
- printing exception message (and traceback)
- else
- finally
- raising exceptions
- assert
- hierarchy of exceptions
- Look before you leap / Easier to ask forgiveness than permission
- custom exceptions (later)
Try
Երբեմն մենք ուզում ենք որ կոդը շարունակի աշխատել նույնիսկ եթե ինչ-որ խնդրիա հանդիպում, կարողա նաև իմամանաք որ որոշ դեպքերում կարողա խնդիր առաջանա որին կարող ենք լուծում տամ, բայց դե եթե կոդը ղարդվեց՝ դե արի ու լուծի խնդիրը հիմա
կարողա՞ ծրագիր ենք գրել որ մարդը յութուբի լինքա տալիս մենք գնում ենք վիդյոն քաշում ենք, հիմա եթե ինտերնետ չլինի, դա մեր կոդի սխալից չի, չարժի ամբողջ հավելվածը ջարդվի, ավելի լավա ուղղակի բռնենք որ տենց բանա եղել ու լուծում տանք
# divide509_by(4)
# divide509_by(0)
divide509_by("a")--------------------------------------------------------------------------- TypeError Traceback (most recent call last) Input In [4], in <cell line: 3>() 1 # divide509_by(4) 2 # divide509_by(0) ----> 3 divide509_by("a") Input In [1], in divide509_by(x) 3 def divide509_by(x): ----> 4 return 509 / x TypeError: unsupported operand type(s) for /: 'int' and 'str'
Հաճախ հանդիպող errorներ
- ImportError: an import fails;
- IndexError: a list is indexed with an out-of-range number;
- NameError: an unknown variable is used;
- SyntaxError: the code can’t be parsed properly;
- TypeError: a function is called on a value of an inappropriate type;
- ValueError: a function is called on a value of the correct type, but with an inappropriate value.
Մի հատ try except
tiv = 5 / "a"
print(tiv)
print('ես դեռ ողջ եմ, ուռաաա')--------------------------------------------------------------------------- TypeError Traceback (most recent call last) Input In [5], in <cell line: 1>() ----> 1 tiv = 5 / "a" 2 print(tiv) 4 print('ես դեռ ողջ եմ, ուռաաա') TypeError: unsupported operand type(s) for /: 'int' and 'str'
try:
tiv = 5 / 0
print(tiv)
except: # if try-ում մի բան ավիրվեց
print('մի բան են չէր')
print('ես դեռ ողջ եմ, ուռաաա')մի բան են չէր
ես դեռ ողջ եմ, ուռաաա
մի քանի հատ try except
if
else
if ..
elif
elif
elseTypeErrorTypeError
try:
# tiv = 5 / 0
# print(tiv)
print(asdasdasdasd)
except ZeroDivisionError: # elif error == "zero division error":
print('ախր բայց չի կարելի է զրոյի բաժանել')
except TypeError: # elif error == "type error":
print('եթե դժվար չի թիվ տուր էլի, ո՞նց ես ուզում թիվը տեքստի վրա բաժանեմ, կարա՞մ, դու կարա՞ս, դե ես էլ չեմ կարա')
except: # else
print("չգիտենք ինչ խնդիր ա")
print('ես դեռ ողջ եմ, ուռաաա')չգիտենք ինչ խնդիր ա
ես դեռ ողջ եմ, ուռաաա
ցանկացած exception բռնցնել
tiv = 5 / "a"--------------------------------------------------------------------------- TypeError Traceback (most recent call last) Input In [13], in <cell line: 1>() ----> 1 tiv = 5 / "a" TypeError: unsupported operand type(s) for /: 'int' and 'str'
try:
# tiv = 5 / a
tiv = 5 / "a"
print(tiv)
except Exception:
print('ինչ-որ բան են չգնաց')
except TypeError:
print('եթե դժվար չի թիվ տուր էլի, ո՞նց ես ուզում թիվը տեքստի վրա բաժանեմ, կարա՞մ, դու կարա՞ս, դե ես էլ չեմ կարա')ինչ-որ բան են չգնաց
նկատենք որ հենց մի հատ exception բռցնումա էլ մնացածը չի ստուգում, elifների նմանա, դրա համար պետքա ուշադիր լինենք հերթկաանության հետ
մի տողով մի քանի տեսակի exception handle անել
try:
a = int(input())
tiv = 5 / a
print(tiv)
except ValueError:
print('Մուտքը սխալ էր')
except (TypeError, ZeroDivisionError): # if error in (Type, Zero)
print("կամ ուզում ես որ զրոյի բաժանեմ, կամ ընդհանրապես թիվ չես տվել, բա եղա՞վ տենց")կամ ուզում ես որ զրոյի բաժանեմ, կամ ընդհանրապես թիվ չես տվել, բա եղա՞վ տենց
Տպել թե ինչ Exceptionա
int("asdfasdfa")--------------------------------------------------------------------------- ValueError Traceback (most recent call last) Input In [17], in <cell line: 1>() ----> 1 int("asdfasdfa") ValueError: invalid literal for int() with base 10: 'asdfasdfa'
5 / 0--------------------------------------------------------------------------- ZeroDivisionError Traceback (most recent call last) Input In [19], in <cell line: 1>() ----> 1 5 / 0 ZeroDivisionError: division by zero
try:
a = int(input())
tiv = 5 / a
print(tiv)
except ValueError as e:
print('Մուտքը սխալ էր')
print(f"Փայթնը մեր վրա ղջայնացավ ու բղավեց {e}")
except (TypeError, ZeroDivisionError) as errorik:
print("կամ ուզում ես որ զրոյի բաժանեմ, կամ ընդհանրապես թիվ չես տվել, բա եղա՞վ տենց")
print(f"Փայթնը մեր վրա ղջայնացավ ու բղավեց {errorik}")
Մուտքը սխալ էր
Փայթնը մեր վրա ղջայնացավ ու բղավեց invalid literal for int() with base 10: 'rtvybuhi'
Կարանք վերջում ուղղակի չնշանեք Exceptionի տեսակը, ինքը կհասկանա Exception որպես
Բայց դե էդ դեպքում չենք կարողանա տպենք նամակը
divide509_by(0)--------------------------------------------------------------------------- ZeroDivisionError Traceback (most recent call last) Input In [22], in <cell line: 1>() ----> 1 divide509_by(0) Input In [1], in divide509_by(x) 3 def divide509_by(x): ----> 4 return 509 / x ZeroDivisionError: division by zero
try:
a = int(input())
tiv = 5 / a
print(tiv)
except ValueError as e:
print('Մուտքը սխալ էր')
print(f"Փայթնը մեր վրա ղջայնացավ ու բղավեց {e}")
# except (TypeError, ZeroDivisionError) as errorik:
# print("կամ ուզում ես որ զրոյի բաժանեմ, կամ ընդհանրապես թիվ չես տվել, բա եղա՞վ տենց")
# print(f"Փայթնը մեր վրա ղջայնացավ ու բղավեց {errorik}")
except Exception as e:
print('չգիտեմ ինչ սխալ գնաց, բայց մի բան սխալ գնաց, զգում եմ', e)չգիտեմ ինչ սխալ գնաց, բայց մի բան սխալ գնաց, զգում եմ division by zero
ավելի մանրամասն գտնել թե ինչը են չէր
import traceback
# traceback.print_exc()
try:
a = int(input())
tiv = 5 / a
print(tiv)
except Exception as e:
print('չգիտեմ ինչ սխալ գնաց, բայց մի բան սխալ գնաց, զգում եմ')
print(f'օձը ասումա {e}')
# traceback.print_exc()
trace = traceback.format_exc()
print(trace)չգիտեմ ինչ սխալ գնաց, բայց մի բան սխալ գնաց, զգում եմ
օձը ասումա division by zero
Traceback (most recent call last):
File "C:\Users\hayk_\AppData\Local\Temp\ipykernel_10612\3585152945.py", line 7, in <cell line: 5>
tiv = 5 / a
ZeroDivisionError: division by zero
Else, էլի else, լավ էլի դե
Else ը գալիսա մեր Exceptionներից հետո
import traceback
try:
a = int(input())
tiv = 5 / a
print(tiv)
except Exception as e: # if problem
print('չգիտեմ ինչ սխալ գնաց, բայց մի բան սխալ գնաց, զգում եմ')
print(f'օձը ասումա {e}')
traceback.print_exc()
else: # no problem
print("ոչ մի խնդիր չառաջացավ, էս ցրել ես հա՞ կոդը ինչ-որ տեղից")5.0
ոչ մի խնդիր չառաջացավ, էս ցրել ես հա՞ կոդը ինչ-որ տեղից
--------------------------------------------------------------------------- NameError Traceback (most recent call last) Input In [29], in <cell line: 3>() 12 else: # no problem 13 print("ոչ մի խնդիր չառաջացավ, էս ցրել ես հա՞ կոդը ինչ-որ տեղից") ---> 14 print(ura_namak) NameError: name 'ura_namak' is not defined
Ինչի՞ else-ը try-ում չգրենք
import traceback
try:
a = int(input())
tiv = 5 / a
print(tiv)
print("ոչ մի խնդիր չառաջացավ, էս ցրել ես հա՞ կոդը ինչ-որ տեղից")
print(ura_namak)
except Exception as e: # if problem
print('չգիտեմ ինչ սխալ գնաց, բայց մի բան սխալ գնաց, զգում եմ')
print(f'օձը ասումա {e}')
traceback.print_exc()
else: # no problem
print("ոչ մի խնդիր չառաջացավ, էս ցրել ես հա՞ կոդը ինչ-որ տեղից")
print(ura_namak)5.0
ոչ մի խնդիր չառաջացավ, էս ցրել ես հա՞ կոդը ինչ-որ տեղից
չգիտեմ ինչ սխալ գնաց, բայց մի բան սխալ գնաց, զգում եմ
օձը ասումա name 'ura_namak' is not defined
Traceback (most recent call last):
File "C:\Users\hayk_\AppData\Local\Temp\ipykernel_10612\781789221.py", line 8, in <cell line: 3>
print(ura_namak)
NameError: name 'ura_namak' is not defined
և վերջապես
Finally blockը աշխատելույա ցանկացած դեպքում կապ չունի tryում սաղ ճիշտ կաշխատի, թե խնդիր կլինի ու կընկնի exceptների մեջ
try:
a = int(input())
tiv = 5 / a
print("try", tiv)
# ...
except Exception as e:
print(f'exception, օձը ասումա {e}')
print(1 / 0)
# ...
else:
print(3 / 0)
print("else", "ոչ մի խնդիր չառաջացավ, էս ցրել ես հա՞ կոդը ինչ-որ տեղից")
finally:
# print(1 / 0)
print(tiv)
print("finally", 'լավ թե վատ ամեն դեպքում մենք մեր գործը արեցինք')
print("okay")try 5.0
--------------------------------------------------------------------------- ZeroDivisionError Traceback (most recent call last) Input In [34], in <cell line: 1>() 9 # ... 10 else: ---> 11 print(3 / 0) 12 print("else", "ոչ մի խնդիր չառաջացավ, էս ցրել ես հա՞ կոդը ինչ-որ տեղից") ZeroDivisionError: division by zero During handling of the above exception, another exception occurred: ZeroDivisionError Traceback (most recent call last) Input In [34], in <cell line: 1>() 12 print("else", "ոչ մի խնդիր չառաջացավ, էս ցրել ես հա՞ կոդը ինչ-որ տեղից") 14 finally: ---> 15 print(1 / 0) 16 print(tiv) 17 print("finally",'լավ թե վատ ամեն դեպքում մենք մեր գործը արեցինք') ZeroDivisionError: division by zero
Գուցե tryը նենց exception քցի որ մենք չենք կարացել բռնենք, մի դեպքում կոդը ստոպ կլիներ ու ներքևում գրածը չէր կատարվի, իսկ էս դեպքում օքեյա
try:
a = int(input())
tiv = 5 / a
print(tiv)
# with open(..) as f:
except ValueError as e:
print(f'օձը ասումա {e}')
print(5/0)
else:
print("ոչ մի խնդիր չառաջացավ, էս ցրել ես հա՞ կոդը ինչ-որ տեղից")
finally:
print('լավ թե վատ ամեն դեպքում մենք մեր գործը արեցինք')123e
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-49-03a9524fe82c> in <cell line: 10>() 8 pass 9 ---> 10 print(error) 11 12 # except ValueError as e: NameError: name 'error' is not defined
Հիմնականում finallyն օգտագործվումա file փակելու, դատաբազային միացումը կտրելու ու նման բաժանվելական գործերում
try:
print(4/0)
except:
passՀերթականությունը
try:
...
except Error:
...
except UrishError:
...
except:
...
else:
...
finally:
...raise
print("Բարև Յուրիկ ձյա")
n = int(input())
if n == 5:
raise ValueError('հաջող Վալոդիկ')
print("hello")Բարև Յուրիկ ձյա
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) Input In [38], in <cell line: 5>() 3 n = int(input()) 5 if n == 5: ----> 6 raise ValueError('հաջող Վալոդիկ') 9 print("hello") ValueError: հաջող Վալոդիկ
assert
num = int(input())
# if num < 0:
# raise Exception()
assert num >= 0
print(num**0.5)--------------------------------------------------------------------------- AssertionError Traceback (most recent call last) Input In [40], in <cell line: 6>() 1 num = int(input()) 3 # if num < 0: 4 # raise Exception() ----> 6 assert num >= 0 8 print(num**0.5) AssertionError:
num = int(input())
assert num >= 0, f"{num} պետքա զրոյից մեծ լինի, եթե մեծ էլ չէ, գոնե հավասար, բացասականը էդ արդեն չափերը անցնելա"
print(num**0.5)--------------------------------------------------------------------------- AssertionError Traceback (most recent call last) Input In [42], in <cell line: 3>() 1 num = int(input()) ----> 3 assert num >= 0, f"{num} պետքա զրոյից մեծ լինի, եթե մեծ էլ չէ, գոնե հավասար, բացասականը էդ արդեն չափերը անցնելա" 5 print(num**0.5) AssertionError: -1 պետքա զրոյից մեծ լինի, եթե մեծ էլ չէ, գոնե հավասար, բացասականը էդ արդեն չափերը անցնելա
4 -> 3
assert code(4) == 3
assert code(5) == 4assertները թեթև հարմար ձև են վստահացնելու որ ծրագիրը չի գա նենց դեպքի որը մենք չենք ակնկալում, հատկապես օգտակար են երբ թեստեր ենք գրում, օրինակ հենց profound.academyի աշխատելու նման
age = int(input())
patver = input()
menu = ["pizza", "gazar"]
assert age >= 18, "Not allowed, too young"
assert patver in menu, f"We don't serve {patver}.\nPlease select from {menu}"
print(f"Matucel {patver}")Matucel pizza
class MerError(Exception):
pass
raise MerError("asda")--------------------------------------------------------------------------- MerError Traceback (most recent call last) <ipython-input-58-06840d9a9184> in <cell line: 0>() 2 pass 3 ----> 4 raise MerError("asda") MerError: asda
Warnings
import warnings
print(1)
warnings.warn("Բալես, զգույշ չմրսես")
print(2)1
2
C:\Users\hayk_\AppData\Local\Temp\ipykernel_8804\110363617.py:4: UserWarning: Բալես, զգույշ չմրսես
warnings.warn("Բալես, զգույշ չմրսես")
def old_function():
warnings.warn("old_function() is deprecated; use new_function()", DeprecationWarning)
old_function()C:\Users\hayk_\AppData\Local\Temp\ipykernel_8804\1897345263.py:2: DeprecationWarning: old_function() is deprecated; use new_function()
warnings.warn("old_function() is deprecated; use new_function()", DeprecationWarning)
Warning Categories In Python there are a variety of built-in exceptions which reflect categories of warning, some of them are: - Warning Class: It is the super class of all warning category classes and a subclass of the Exception class. - UserWarning Class: warn() function default category. - DeprecationWarning Class: Base category for alerts regarding obsolete features when those warnings are for other developers (triggered by code in main unless ignored). - SyntaxWarning Class: Base class for warnings of suspicious syntactic attributes. - RuntimeWarning Class: Base class for warnings of suspicious run time attributes. - FutureWarning Class: Base class for warnings on obsolete features when certain warnings are meant for end-users of Python-written programs. - PendingDeprecationWarning Class: Base class for warnings of an outdated attribute. - ImportWarning Class: Base class for warnings caused during a module importation process. - UnicodeWarning Class: Base class for Unicode based warnings. - BytesWarning Class: Base class for bytes and bytearray based warnings. - ResourceWarning Class: Base class for resource-related warnings.
import warnings
# displaying warning
warnings.warn('Geeks 4 Geeks')
warnings.warn('Do not show this message')C:\Users\hayk_\AppData\Local\Temp\ipykernel_8804\922855606.py:4: UserWarning: Geeks 4 Geeks
warnings.warn('Geeks 4 Geeks')
C:\Users\hayk_\AppData\Local\Temp\ipykernel_8804\922855606.py:5: UserWarning: Do not show this message
warnings.warn('Do not show this message')
import warnings
warnings.filterwarnings("ignore") # ignore all warnings
# displaying warning
warnings.warn('Geeks 4 Geeks')
warnings.warn('Do not show this message')
import warnings
warnings.filterwarnings("ignore", ".*do not*.") # ignore all warnings
# displaying warning
warnings.warn('Geeks 4 Geeks')
warnings.warn('Do not show this message')
import warnings
def square_root(x):
if x < 0:
warnings.warn("Negative input; returning 0", UserWarning)
return 0
return x ** 0.5
# Example: catching warnings
with warnings.catch_warnings(record=True) as caught:
warnings.simplefilter("always") # Ensure all warnings are captured
result = square_root(-4)
assert result == 0
# `caught` is a list of WarningMessage objects
assert len(caught) == 1
wm = caught[0]
print(f"Warning category: {wm.category.__name__}")
print(f"Message: {wm.message}")
print(f"Origin: {wm.filename}, line {wm.lineno}")Warning category: UserWarning
Message: Negative input; returning 0
Origin: C:\Users\hayk_\AppData\Local\Temp\ipykernel_8804\4150241946.py, line 5
Մոտեցումներ
- Easier to Ask Forgiveness than Permission (EAFP)
- Look Before You Leap (LBYL)
Նյութ (էս լավ կայքա)
try:
x = 0
tiv = 5 / x
print(tiv)
except: # if try-ում մի բան ավիրվեց
print('մի բան են չէր')
print('ես դեռ ողջ եմ, ուռաաա')մի բան են չէր
ես դեռ ողջ եմ, ուռաաա
x = "a"
if x == 0:
print("zro chi kareli")
elif type(x)==str: # isinstance(x, str)
print("String chi kareli")
else:
tiv = 5 / x
print(tiv)String chi kareli
Exceptionների hierarchy
import time
time.sleep(10) # cntrl c--------------------------------------------------------------------------- KeyboardInterrupt Traceback (most recent call last) Input In [11], in <cell line: 3>() 1 import time ----> 3 time.sleep(10) #cntrl c KeyboardInterrupt:
BaseException
├── BaseExceptionGroup
├── GeneratorExit
├── KeyboardInterrupt
├── SystemExit └── Exception ├── ArithmeticError │ ├── FloatingPointError │ ├── OverflowError │ └── ZeroDivisionError ├── AssertionError ├── AttributeError ├── BufferError ├── EOFError ├── ExceptionGroup [BaseExceptionGroup] ├── ImportError │ └── ModuleNotFoundError ├── LookupError │ ├── IndexError │ └── KeyError ├── MemoryError ├── NameError │ └── UnboundLocalError ├── OSError │ ├── BlockingIOError │ ├── ChildProcessError │ ├── ConnectionError │ │ ├── BrokenPipeError │ │ ├── ConnectionAbortedError │ │ ├── ConnectionRefusedError │ │ └── ConnectionResetError │ ├── FileExistsError │ ├── FileNotFoundError │ ├── InterruptedError │ ├── IsADirectoryError │ ├── NotADirectoryError │ ├── PermissionError │ ├── ProcessLookupError │ └── TimeoutError ├── ReferenceError ├── RuntimeError │ ├── NotImplementedError │ └── RecursionError ├── StopAsyncIteration ├── StopIteration ├── SyntaxError │ └── IndentationError │ └── TabError ├── SystemError ├── TypeError ├── ValueError │ └── UnicodeError │ ├── UnicodeDecodeError │ ├── UnicodeEncodeError │ └── UnicodeTranslateError └── Warning ├── BytesWarning ├── DeprecationWarning ├── EncodingWarning ├── FutureWarning ├── ImportWarning ├── PendingDeprecationWarning ├── ResourceWarning ├── RuntimeWarning ├── SyntaxWarning ├── UnicodeWarning └── UserWarning
BaseException
├── BaseExceptionGroup
├── GeneratorExit
├── KeyboardInterrupt
├── SystemExit
└── Exception
├── ArithmeticError
│ ├── FloatingPointError
│ ├── OverflowError
│ └── ZeroDivisionError
├── AssertionError
├── AttributeError
├── BufferError
├── EOFError
├── ExceptionGroup [BaseExceptionGroup]
├── ImportError
│ └── ModuleNotFoundError
├── LookupError
│ ├── IndexError
│ └── KeyError
├── MemoryError
├── NameError
│ └── UnboundLocalError
├── OSError
│ ├── BlockingIOError
│ ├── ChildProcessError
│ ├── ConnectionError
│ │ ├── BrokenPipeError
│ │ ├── ConnectionAbortedError
│ │ ├── ConnectionRefusedError
│ │ └── ConnectionResetError
│ ├── FileExistsError
│ ├── FileNotFoundError
│ ├── InterruptedError
│ ├── IsADirectoryError
│ ├── NotADirectoryError
│ ├── PermissionError
│ ├── ProcessLookupError
│ └── TimeoutError
├── ReferenceError
├── RuntimeError
│ ├── NotImplementedError
│ └── RecursionError
├── StopAsyncIteration
├── StopIteration
├── SyntaxError
│ └── IndentationError
│ └── TabError
├── SystemError
├── TypeError
├── ValueError
│ └── UnicodeError
│ ├── UnicodeDecodeError
│ ├── UnicodeEncodeError
│ └── UnicodeTranslateError
└── Warning
├── BytesWarning
├── DeprecationWarning
├── EncodingWarning
├── FutureWarning
├── ImportWarning
├── PendingDeprecationWarning
├── ResourceWarning
├── RuntimeWarning
├── SyntaxWarning
├── UnicodeWarning
└── UserWarningclass MerSepakanException(Exception):
pass
# def __init__(self):
# # self.message = message
# super().__init__(self.message)
ser = input("Դուք սիրու՞մ եք կարգին հաղորդում")
if ser != "շատ":
raise MerSepakanException()--------------------------------------------------------------------------- MerSepakanException Traceback (most recent call last) Input In [12], in <cell line: 8>() 7 ser = input("Դուք սիրու՞մ եք կարգին հաղորդում") 8 if ser != "շատ": ----> 9 raise MerSepakanException() MerSepakanException:
class MerSepakanException(Exception):
pass
# def __init__(self):
# # self.message = message
# super().__init__(self.message)
ser = input("Դուք սիրու՞մ եք կարգին հաղորդում")
if ser != "շատ":
raise MerSepakanException()Դուք սիրու՞մ եք կարգին հաղորդումադսֆ
--------------------------------------------------------------------------- MerSepakanException Traceback (most recent call last) <ipython-input-55-97792bd6e7fd> in <cell line: 8>() 7 ser = input("Դուք սիրու՞մ եք կարգին հաղորդում") 8 if ser != "շատ": ----> 9 raise MerSepakanException() MerSepakanException:
class MerSepakanException(Exception):
def __init__(self, namak):
self.message = namak
super().__init__(self.message)
ser = input("Դուք սիրու՞մ եք կարգին հաղորդում")
if ser != "շատ":
raise MerSepakanException(f"Բա չես ամանչում, ասում ես {ser}")Դուք սիրու՞մ եք կարգին հաղորդումsedrtyu
--------------------------------------------------------------------------- MerSepakanException Traceback (most recent call last) <ipython-input-60-8f288f8bebd0> in <cell line: 7>() 6 ser = input("Դուք սիրու՞մ եք կարգին հաղորդում") 7 if ser != "շատ": ----> 8 raise MerSepakanException(f"Բա չես ամանչում, ասում ես {ser}") MerSepakanException: Բա չես ամանչում, ասում ես sedrtyu
🛠️ Գործնական (ToDo)
🏡Տնային
https://www.notion.so/shudadi-shudada/Password-generator-validator-1b58d0610fed81d0bbf9e756e1152297
🎲 11
- ▶️TED
- ▶️Random link
- 🇦🇲🎶Որդան կարմիր
- 🌐🎶Chris Isaac
- 🤌Կարգին