true or false 1)one reason to use functions is to avoid duplicating code 2)the p
ID: 3843671 • Letter: T
Question
true or false
1)one reason to use functions is to avoid duplicating code
2)the python dictionary class is not mutable
3)by conention, a variable in a method which. is an instance variable for the class in prefixed with self
true or false.
1)the python dictionary class is not mutable?
2)one reason to use function is to avoid duplicating code
3)by convention, a variable in method which is an instance variable for the class is prefixed with self.
4)unit testing is testing separate parts/units of the program separately
Explanation / Answer
1.
Statement :
One reason to use functions is to avoid duplicating code.
The above statement is True.
Reason :
2.
Statement :
The python dictionary class is not mutable.
The above statement is False.
Reason :
3.
Statement :
by conention, a variable in a method which. is an instance variable for the class in prefixed with self.
The above statement is True.
Reason :
Exxample :
score= 10
def __init__(self, name): # here we declare self
self.name = name
self.score = [ ]
for i in range(Student.score):
self.score.append(0)
4.
Statement :
unit testing is testing separate parts/units of the program separately.
The above statement is True.
Unit testing :
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.