Untitled
10 Questions
7 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

type of errors in which the program executes but gives incorrect result is

  • syntax
  • logic (correct)
  • exception
  • compiler
  • exception is generated by

  • raise (correct)
  • throw
  • generate
  • try
  • the block to handle all the exception is

  • try:
  • catch:
  • except: (correct)
  • except Exception:
  • which block is executed when no exception is raised from the try block?

    <p>else</p> Signup and view all the answers

    try block is immediately followed by _____ block to handle an exception.

    <p>except</p> Signup and view all the answers

    which exception is raised when two or more data types are mixed without coercion?

    <p>TypeError</p> Signup and view all the answers

    when you accept string instead of integer value,____ is raised.

    <p>ValueError</p> Signup and view all the answers

    which statement raises exception if the expression is false?

    <p>assert</p> Signup and view all the answers

    what will be the output of the following code? x=[1,2,3,4] print(x[4])

    <p>IndexError</p> Signup and view all the answers

    '1'==1 will result in

    <p>false</p> Signup and view all the answers

    Use Quizgecko on...
    Browser
    Browser