Week 7 - debugging & unit testing Flashcards
1
Q
3 ways to debug?
A
- Using print statement
- In interactive text book - codelens
- %debug - creates output similar to codelens.
2
Q
What is Functional decomposition?
A
It is breaking problems into smaller chunks.
3
Q
What is an example of a good docstring?
A
’'’descriptions of function
param - parameter_name: description
param - parameter_name: description
return: description of what will be returned.
4
Q
What help(function_name) used for?
A
To print the functions docstring.
5
Q
How can you text functions (2)?
A
- import test
2. can use a conditional statement, defined within another function.
6
Q
What is Black box testing?
A
It is a testing method in which the internal structure is not known to the tester.
7
Q
What is white box testing?
A
It is a testing method in which the internal structure is known to the tester.