0
Fill the blank where I have made like this - - - - - and help me to complete my program.
Class person def_init_ (self, name) : Self. name=name @property def name( self) : return self_ name ------------------- (please fill this for setter for the property name) def name (self. value) self. value =value
24 Réponses
+ 8
Class person:
def_init_ (self, name) :
Self. name=name
@property
def name( self) :
return self_ name
@name.setter
def name (self. value)
self._name =value
+ 3
class Person:
def __init__(self, name):
self._name = name
@property
def name(self):
return self._name
@name.setter
def name(self, value):
self.
_name
= value
+ 3
Class person
def_init_ (self, name) :
Self. name=name
@property
def name( self) :
return self_ name
@name.setter
def name (self. value)
self._name =value
+ 2
Class person:
def_init_ (self, name) :
Self. name=name
@property
def name( self) :
return self_ name
@name.setter
def name (self. value)
self._name =value
+ 1
List<string> li = new List<string>();
li.Add("Hi");
Console.Write(li[0]);
0
Sorry if I offended you, I was merely suggesting you take a different approach to ask for help.
0
Anybody can tell how to use setter for property in above peace of code
0
@name.setter
0
let prop = 'foo';
let o = {
[
prop]: 'lol'
,
['b' + 'ar']
:
'123'
};
0
[
,
:
0
Fill in the blanks to create an object with its properties.
let prop = 'foo';
let o = {
[
prop]: 'lol'
,
['b' + 'ar']
:
'123'
};
0
class Person:
def __init__(self, name):
self._name = name
@property
def name(self):
return self._name
@name.setter
def name(self, value):
self.
_name
= value
0
Fill in the blanks to create a List object, add an element with the value "Hi" to it, and output the elements value.
List<string> li = new List<string>();
li
.Add("Hi");
Console.Write(li[__]);
can somebody tell me what the answer inside of that braces thank you :<
0
Class person:
def_init_ (self, name) :
Self. name=name
@property
def name( self) :
return self_ name
@name.setter
def name (self. value)
self._name =value
hope it helps
0
Fill in the blanks to make a setter for the property name.
answer : class Person:
def __init__(self, name):
self._name = name
@property
def name(self):
return self._name
@name.setter
def name(self, value):
self._name = value
- 1
Fill in the blanks to create an object with its properties.
let prop = 'foo';
let o = {
prop]: 'lol'
['b' + 'ar']
'123'
};
- 1
let prop = 'foo';
let o = {
[
prop]: 'lol'
,
['b' + 'ar']
:
'123'
};
- 1
https://youtu.be/Tg4Du8eUFw8
full python tutorial video link
- 1
class Person:
def __init__(self, name):
self.name = name
def greeting(self):
# Should return "hi, my name is " followed by the name of the Person.
return f'hi, my name is, {self.name}'
# Create a new instance with a name of your choice
some_person = Person("Jane")
# Call the greeting method
print(some_person.greeting())
- 1
Fill in the blanks to make a setter for the property name.
class Person:
def __init__(self, name):
self._name = name
@property
def name(self):
return self._name
@name.setter
def name(self, value):
self._name = value