Untitled

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

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 (C)</p> Signup and view all the answers

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

<p>except (D)</p> Signup and view all the answers

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

<p>TypeError (A)</p> Signup and view all the answers

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

<p>ValueError (B)</p> Signup and view all the answers

which statement raises exception if the expression is false?

<p>assert (D)</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 (D)</p> Signup and view all the answers

'1'==1 will result in

<p>false (B)</p> Signup and view all the answers

Flashcards are hidden until you start studying

Use Quizgecko on...
Browser
Browser