Is related to python 1) All the instances of a class share the same data attribu
ID: 3535633 • Letter: I
Question
Is related to python
1) All the instances of a class share the same data attributes; changing the attribute of one instance changes it for all instances
true or false
2) Which string method returns True if applied to a string containing only ‘ ’ characters?
3) One difference between setters and getters is: a setter has one or more parameters; a getter has no parameters
4) To change the value of a string, you delete it and assign it a new value, because strings are
5) How are instance variables kept private, so they can only be exposed using methods?
start the name of the variable with two underscores:__name
use the word "private", as in: private name
all instance variables are private; nothing special is needed
define the class to be private, as in: private class
Explanation / Answer
1. false
2.
3.true
4. immutable
5.start the name of the variable with two underscores:__name
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.