Level 016
Level 016
python3
import os
os.system("cls")
https://www.tutorialspoint.com/python/python_exceptions.htm
https://www.programiz.com/python-programming/exception-handling
https://www.programiz.com/python-programming/exceptions
https://www.pythonforbeginners.com/error-handling/exception-handling-in-python
https://en.wikibooks.org/wiki/Python_Programming/Exceptions
https://en.wikibooks.org/wiki/Python_Programming/Exceptions
https://www.datacamp.com/community/tutorials/exception-handling-python
https://www.datacamp.com/community/tutorials/exception-handling-python#zero
https://www.javatpoint.com/python-exception-handling#! python3
import os
os.system("cls")
#! python3
import os
os.system("cls")
print ("\nCurrently We Are Out of The \"if\" Branch, Operating in The Main Stream
of The Program", end = "\n")#! python3
import os
os.system("cls")
print ("\nCurrently We Are Out of The \"if\" Branch, Operating in The Main Stream
of The Program", end = "\n")
#! python3
import os
os.system("cls")
print ("\nCurrently We Are Out of The \"if\" Branch, Operating in The Main Stream
of The Program", end = "\n")#! python3
import sys
assert ('win32' in sys.platform), "This Code Runs Only on Windows Machine."
import os
os.system("cls")
#! python3
import os
os.system("cls")
try :
result = inValue01 / inValue02
print ("The Quotient of ", inValue01, " and ", inValue02, " is : ", result,
end = "\n\n")
except ZeroDivisionError :
print("\nDenominator Cannot Be Zero, Division Cannot Be Continued", end="\n\
n")
#! python3
import os
os.system("cls")
try :
result = inValue01 / inValue02
print ("The Quotient of ", inValue01, " and ", inValue02, " is : ", result,
end="\n\n")
except ZeroDivisionError :
print("\nDenominator Cannot Be Zero, Division Cannot Be Continued", end="\n\
n")
else :
print ("Operation Completed Successfully, Continuing With The Next Level
Task", result, end="\n\n")
#! python3
import os
os.system("cls")
import math
print("\nThe Exponentiation Calculated For ", inValue01, " is : ",
math.exp(inValue01), end = "\n")
#! python3
import os
os.system("cls")
try:
import math
print("\nThe Exponentiation Calculated For ", inValue01, " is : ",
math.exp(inValue01), end = "\n")
except OverflowError:
print("\nOverFlow Exception Raised. Please Cross Check With The Vendor", end
= "\n")
else:
print("\nExponentiation Calculation is Done Successfully...")
#! python3
import os
os.system("cls")
try :
inNumber = int(input("\nEnter Any Numerical Value : "))
print("\nThe Given Number is : ", inNumber, end = "\n")
except ValueError :
print("\nSorry! You Can Only Input Numbers, Value is Mismatching Cannot
Continue...", end = "\n")
sys.exit()
else :
print("\nOperation Done Successfully", end = "\n")
#! python3
import os
os.system("cls")
#! python3
import os
os.system("cls")
import os
os.system("cls")