GK SCIENTIST

General Knowledge One Stop Source
Menu
  • Home
  • Social Science
    • History
    • Political Science
    • Geography
  • Science
    • Physics
    • Chemistry
    • Biology
  • Chemistry Notes
  • Mathematics
  • Computer
  • Tutorial MySQL
  • Tutorial Python
  • Java Tutorial
  • English Grammar
  • English Essay
  • Indian Anthropology
  • Philosophy
  • Solved Paper
  • UPSC
  • Current Content
    • Current Affairs
    • RSTV News
    • Yojana and Kurukshetra Gist
  • Donate
  • Contact Us

If you are interested in advertising to our audience, submit the advertising enquiry form.

Advertising Enquiry
Computer

Python Built-in-Exceptions

Gk Scientist December 6, 2022 No Comments
Tweet WhatsApp Telegram

Python Built-in-Exceptions:

We can use the PyCharm code editor for this example. If you do not know about it then follow this link- How to install PyCharm for Python and create a program in it.

(1) The built-in-exceptions, such as NameError or SynatxError, are created for reporting specific errors in the code. Built-in-exceptions are common errors that can identify automatically by Python. Python throws an exception when one of these errors is detected. This means a traceback message is generated and the message is printed in the Interactive Window; if the erroneous code is in a script, the script will stop running at that point.

(2) New programmers often encounter Name Error, SyntaxError, and TypeError exceptions. The NameError usually occurs because of a spelling or capitalization mistake in the code. The SyntaxError can occur for many reasons, but the underlying problem is that one of the rules of properly formed Python has been violated. A TypeError occurs when the code attempts to use an operator differently from how it’s designed. For example, code that adds an integer to a string generates a TypeError.

NameError Example:

Python NameError - Python Built-in-Exceptions

SyntaxError Example:

Python SyntaxError - Python Built-in-Exceptions

TypeError Example:

Python TypeError - Python Built-in-Exceptions

Tutorial Python
Tutorial MySQL
Email (Electronic Mail)
Operating System (OS)
Computer Network
Database Models or Data Models
Python Built-in Exceptions– Official Docs
Prev Article
Next Article

Related Articles

Create Java MenuBar and Menus
Create Java MenuBar: We can use the Eclipse IDE for …
Gk Scientist January 17, 2023 Computer

Create Java MenuBar and Menus

Malicious Software (Malware)
Malicious Software: Malware is a shortened term for malicious software …
Gk Scientist September 14, 2022 Computer

Malicious Software (Malware)

Java TextField
Java TextField: We can use the Eclipse IDE for this …
Gk Scientist January 20, 2023 Computer

Java TextField

Email (Electronic Mail)
Email: Electronic Mail is sending and receiving messages by a …
Gk Scientist September 16, 2022 Computer

Email (Electronic Mail)

Information and Communication Technology (ICT)
Information and Communication Technology: It may be defined as the …
Gk Scientist October 25, 2022 Computer

Information and Communication Technology (ICT)

Client-Server Architecture
What is Client-Server Architecture? A client means a layer or …
Gk Scientist October 7, 2022 Computer

Client-Server Architecture

MySQL Insert Query (Single Row and Multiple Row)
MySQL Insert Query: (1) In the previous blog, we learn …
Gk Scientist November 11, 2022 Computer

MySQL Insert Query (Single Row and Multiple Row)

Pickle Module in Python
Pickle Module in Python: We can use the PyCharm code …
Gk Scientist December 4, 2022 Computer

Pickle Module in Python

Leave a Reply Cancel Reply

Search




  • Popular
  • Recent




GK SCIENTIST

General Knowledge One Stop Source

Information

  • About Us
  • Terms and Condition, Disclaimer
  • Contact Us

Android Apps

  • IAS App For English Medium Students
  • IAS Basics App For English Medium Students
  • IAS Hindi App For Hindi Medium Students
DMCA.com Protection Status

Popular Tags

Biology (33) Biology Questions (88) Chemistry (57) Computer (214) Current Affairs (4) Current Content (0) Economy (10) English Essay (172) English Grammar (75) English Literature (10) Geography (83) History (259) Indian Anthropology (11) Indian Polity (14) JKAS Mains Question Papers (17) Mathematics (68) Moral Science (7) NCERT & Other Boards Books (25) Philosophy (114) Physics (89) Political Science (132) RS TV News (33) Science (553) Social Anthropology (7) Social Science (17) Solved Paper (47) UPSC (7) UPSC Mains Question Papers (26)

Downloads

  • NCERT Books
  • Old NCERT Books
  • NIOS Books For IAS, SSC, and State PSC Exam
  • Tamil Nadu Board Books: Important For UPSC, SSC, and State PSC Exam
  • Modern Indian and World History Notes For IAS Exam
  • UPSC Topper 2013 Gaurav Agrawal Notes For IAS Preparation
  • UPSC IAS Prelims General Studies – Previous Year Papers
  • UPSC Mains Question Papers

Copyright © 2023 GK SCIENTIST
Theme by MyThemeShop.com & Hosted On Cloudways

Ad Blocker Detected

Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Refresh
 

Loading Comments...