Code Evaluation Flashcards

1
Q

The accepted name for function is a class

A

method

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

Instead of naming functions after what the function does, instead the name should?

A

Name it as if it is a command

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

What should be the basic composition of functions?

A

small and simple

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

Naming convention for classes should be

A

camel case

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

The __init__ function should

A

Not do too much, It makes them harder to use

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

naming convention for class methods

A

underscore format

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

method argument should be

A

organized and consistent

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

With variable you should try not to

A

use variables that come from the module or globals. They should be fairly self contained.

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

A foolish consistency is the hobgoblin of little minds.

A

THINK FOR YOURSELF!!!!!!

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

format for class names?

A

Always, always have class Name(object)

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