Type Errors

 

  • In Python we can classify the error in 3 ways:
  • Syntax Errors

    Runtime Errors

    Logical Errors

     

    Syntax Errors:

  • Mistakes happend at user end
  • We can rectify manually
  • Ex: Mistakes at key words
  •  

    Run Time Errors

     

  • Execution stops while running the program
  • Such type of errors syntactically accurate, but occurs errors while running the program
  • Ex: Division by zero, Access the file which doesn't exists
  •  

    Logical Errors

     

  • Program executes correctly, but gives wrong result
  • Ex: Using wrong variable name
  •  

    Exception Handling

     

  • When program gives abnormal termination, we can avoid this through exception handling
  • i.e., we need to handle the Errors with Exception
  • We can mention multiple errors in tuple, Except(Value Error, Zero Division Error)
  •  

    Name Error:

  • Application throws Name Error when we provide wrong variable name
  •  

     

    Type Error:

  • Occures when we provide wrong type
  •  

     

    Value Error:

  • Occures when we provide wrong argument values
  • Occurs when it is not an integer
  •  

    ZerodivisionError:

  • Occures when denominator is zero
  •  

    Index Error:

  • Occures when Provided index number doesn't exists