🚀Full Stack Python || Pt-77: Exception Handling | Types of Error, try, except, ||🌟📚✨ Notes Included!

preview_player
Показать описание

📝Handwritten notes:

🐞 Error Types: Python errors include compile-time, logical, and runtime errors.
🛠️ Compile-Time Errors: Occur during compilation due to syntax issues.
🤔 Logical Errors: Arise from flawed logic and cause incorrect results.
⏳ Runtime Errors: Occur during program execution, like division by zero.
🚫 Exception Definition: An error disrupting normal program flow.
🛡️ Exception Handling: Mechanism to manage exceptions gracefully.
💬 Handling Benefits: Prevents crashes, provides custom messages.
📦 Exception Categories: Predefined and user-defined exceptions.
🗝️ Keywords: try, except, finally, raise.
🧮 Example Usage: Dividing numbers with a custom error message for zero division.

#codewithharry #codewithnix #codebasics #telusko #anujbhaiya #apnacollege #thapatechnical #codewithchris #simplilearn #codevolution #thenetninja #programmingwithmosh #kunalkushwaha #saurabhshukla #codecademy #programmingknowledge #codecademy #mysirgdotcom #geekyshows #hiteshchoudhary
Рекомендации по теме
Комментарии
Автор

n1 = int(input("Enter First Number: "))
n2 = int(input("Enter Second Number: "))
n3 = n1 / n2
print(n1, n2, n3)

aperxmim
Автор

n1 = int(input("Enter First Number: "))
n2 = int(input("Enter Second Number: "))
try:
n3 = n1 / n2
print(n1, n2, n3)
except ZeroDivisionError:
print("cannot divide number by zero")

aperxmim
visit shbcf.ru