Python Testing and Debugging
Python Testing and Debugging - Important Points
16. | What is a syntax error in Python? |
---|
A. An error that occurs when the code is not valid Python syntax
B. An error that occurs when the program runs out of memory
C. An error that occurs when the program encounters unexpected input
D. An error that occurs when the program divides by zero
View Answer Discuss Work SpaceAnswer: option a
Explanation:
17. | What is a runtime error in Python? |
---|
A. An error that occurs when the code is not valid Python syntax
B. An error that occurs when the program runs out of memory
C. An error that occurs when the program encounters unexpected input
D. An error that occurs during program execution, such as dividing by zero or accessing an undefined variable
View Answer Discuss Work SpaceAnswer: option d
Explanation:
18. | What is a logical error in Python? |
---|
A. An error that occurs when the code is not valid Python syntax
B. An error that occurs when the program runs out of memory
C. An error that occurs when the program encounters unexpected input
D. An error that occurs when the program produces incorrect output due to a flaw in the logic
View Answer Discuss Work SpaceAnswer: option d
Explanation:
19. | What is unit testing in Python? |
---|
A. Testing individual units or components of code in isolation
B. Testing the entire program as a whole
C. Testing user interface interactions
D. Testing database connections
View Answer Discuss Work SpaceAnswer: option a
Explanation:
20. | What is test-driven development (TDD) in Python? |
---|
A. A development process that involves writing tests before writing code
B. A development process that involves writing code before writing tests
C. A development process that involves manual testing
D. A development process that involves testing only after the code is complete
View Answer Discuss Work SpaceAnswer: option a
Explanation: