0
create class and its constructor taking one argument and as singing in to the "name " attribute then create and object of the class.
create class and its constructor. ____student: def____(self,name): self ___=name test=student("bob") can any one def object of class line tow. what is it???
10 Antworten
+ 5
class Student:
def __init__(self,name):
self.name=name
test=student("Bob")
+ 1
class my_class
{
private:
int my_data;
public:
my_class (int arg) {
my_data = arg
;
}
0
class Student:
def __init__(self,name):
self.name=name
test=student("Bob")
0
Fill in the blanks to create a class and its constructor, taking one argument and assigning it to the "name" attribute. Then create an object of the class.
class
Student:
def
__init__
(self, name):
self
.name
= name
test = Student("Bob"
)
0
here i found the answer
class
Student:
def
__init__
(self, name):
self
.name
= name
test = Student("Bob"
- 1
ill in the blanks to create a class and its constructor, taking one argument and assigning it to the "name" attribute. Then create an object of the class.
class Student:
def _init_(self, name):
self.name= name
test = Student("Bob")
- 2
Class student:
def__init__(self,name):
Self.name=name
test=student("bob")
- 2
Class in it name :
- 3
it's__ inti__ but don't be stupid like me you need think quick both sides needs two under score in equal. thanks anyways.
- 6
Fill in the blanks to declare the class my_class with its constructor.
my_class
{
private:
int my_data;
public:
(int arg) {
my_data =
;
}
};