Week 7 - debugging & unit testing Flashcards

1
Q

3 ways to debug?

A
  1. Using print statement
  2. In interactive text book - codelens
  3. %debug - creates output similar to codelens.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is Functional decomposition?

A

It is breaking problems into smaller chunks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What help(function_name) used for?

A

To print the functions docstring.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can you text functions (2)?

A
  1. import test

2. can use a conditional statement, defined within another function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is Black box testing?

A

It is a testing method in which the internal structure is not known to the tester.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is white box testing?

A

It is a testing method in which the internal structure is known to the tester.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly