Quiz on Python Debugger
FREE Online Courses: Click for Success, Learn for Free - Start Now!
Quiz Summary
0 of 15 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Results
Results
0 of 15 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- Current
- Review / Skip
- Answered
- Correct
- Incorrect
-
Question 1 of 15
1. Question
- Which of the following is/are the facilities provided by the PDB module?
CorrectIncorrect -
Question 2 of 15
2. Question
- What is the function of the set_trace() method?
CorrectIncorrect -
Question 3 of 15
3. Question
- Which of the following commands give the list with the pointer on the line where the execution stopped?
CorrectIncorrect -
Question 4 of 15
4. Question
- What does the below code return when the first command is ‘where’?
-
import pdb
pdb.set_trace()
n = int(input(“Enter the number : “))
print(n)
CorrectIncorrect -
Question 5 of 15
5. Question
- Which of the command is used to execute the current line where the execution stopped?
CorrectIncorrect -
Question 6 of 15
6. Question
- In the below code if the command to the pdb is ‘n’, what will be the output, if the value of n is 5?
import pdb
n = int(input(“Enter the number : “))
pdb.set_trace()
for i in range(n):
print(i,end=”)
CorrectIncorrect -
Question 7 of 15
7. Question
- Which of the commands add a breakpoint at line 5 in the program?
CorrectIncorrect -
Question 8 of 15
8. Question
- What is the command used to remove all the breakpoints?
CorrectIncorrect -
Question 9 of 15
9. Question
- What does the below command ‘a’ return for the given code if the value of ‘n’ given is 4?
-
import pdb
def sq(n):
n=n**2
return n
n = int(input(“Enter the number : “))
pdb.set_trace()
print(sq(n))
-
(Pdb) s
–Call–
> c:\users\ch gayathri lakshmi\downloads\demo.py(2)sq()
-> def sq(n):
(Pdb) a
CorrectIncorrect -
Question 10 of 15
10. Question
- Which of the following commands print value in the variable named ‘var’?
CorrectIncorrect -
Question 11 of 15
11. Question
- What does the below command ‘whatis n’ return if the value of n given is 5?
-
import pdb
def sq(n):
n=n**2
return n
n = int(input(“Enter the number : “))
pdb.set_trace()
print(sq(n))
CorrectIncorrect -
Question 12 of 15
12. Question
- Which of the following shows the code in the function?
import pdb
def sq(n):
n=n**2
return n
n = int(input(“Enter the number : “))
pdb.set_trace()
print(sq(n))
CorrectIncorrect -
Question 13 of 15
13. Question
- What does the below code does?
- ignore 2 3
CorrectIncorrect -
Question 14 of 15
14. Question
- Which of the following is not a function in pdb module?
CorrectIncorrect -
Question 15 of 15
15. Question
- Which of the following disables the second break point?
CorrectIncorrect