Font size
Worksheetstl
Total questions: 35
Worksheet time: 19mins
С помощью какой функции можно проверить принадлежность объекта к определенному классу?
issubclass
enumerate
isinstance
type
setattr
С помощью какой функции можно проверить тип объекта?
issubclass
enumerate
isinstance
type
setattr
Что будет напечатано в результате вызова данного кода?
{'name': 'Serega', 'age': 88, 'salary': 15000}
Serega
88
15000
Каков будет результат последней команды кода?
{'name': 'Serega', 'age': 88, 'salary': 25000}
{'name': 'Serega', 'age': 88, 'salary': 15000}
'Serega', 88, 25000
NameError: name 'obj1' is not defined
Каков будет результат последней команды кода?
{'name': 'Serega', 'age': 88, 'salary': 25000}
{'name': 'Serega', 'age': 88, 'salary': 15000}
'Serega', 88, 25000
NameError: name 'obj1' is not defined
Что выведет на экран данная программа?
0
name
Serega
obj1
Какой параметр должен обязательно присутствовать при определении метода класса
(a)
Получение нового типа объекта на основе уже существующей с частично или полностью наследованной от родителей функциональностью - это...
полиморфизм
инкапсуляция
абстракция
наследование
Какое сообщение выведет данный код?
25000
15000
AttributeError: 'Person' object has no attribute '__salary'
Что будет выведено на экран в результате работы программы?
15000
AttributeError: 'Person' object has no attribute '_Person'
25000
What is a class (in python)?
A user-defined prototype for an object that defines a set of attributes that characterize any object of this. The attributes are data members and methods, accessed via dot notation.
A special kind of function that is defined in a class definition.
The assignment of more than one behavior to a particular function. The operation performed varies by the types of objects or arguments involved.
the system of ordering a society in which people are divided into sets based on perceived social or economic status.
What is a data member (in python)?
A class variable or instance variable that holds data associated with a class and its objects.
a person who is part of the club DATA
A variable that is defined inside a method and belongs only to the current instance of a class.
An individual object of a certain class. An object obj that belongs to a class Circle, for example, is an instance of the class Circle.
What does function overloading mean (in python)?
An individual object of a certain class. An object obj that belongs to a class Circle, for example, is an instance of the class Circle.
A user-defined prototype for an object that defines a set of attributes that characterize any object of the class. The attributes are data members (class variables and instance variables) and methods, accessed via dot notation.
the function overloads and kills the computer
The assignment of more than one behavior to a particular function. The operation performed varies by the types of objects or arguments involved.
What is an instance variable (in python)?
An individual object of a certain class. An object obj that belongs to a class Circle, for example, is an instance of the class Circle.
A variable that is defined inside a method and belongs only to the current instance of a class.
The transfer of the characteristics of a class to other classes that are derived from it.
A special kind of function that is defined in a class definition.
What does inheritance mean in python?
The transfer of the characteristics of a class to other classes that are derived from it.
A variable that is defined inside a method and belongs only to the current instance of a class
The creation of an instance of a class.
It is what you sometimes get when a relative passes away
What is an instance in python?
A special kind of function that is defined in a class definition.
The creation of an instance of a class.
An individual object of a certain class. An object obj that belongs to a class Circle, for example, is an instance of the class Circle.
A moment in time
What is a method in python?
a way of doing something
a special kind of function that is defined in a class definition
the creation of an instance of a class
orderliness of thought or behavior; systematic planning or action
What is an object in python?
A unique instance of a data structure that's defined by its class. An object comprises both data members (class variables and instance variables) and methods.
A special kind of function that is defined in a class definition.
The assignment of more than one function to a particular operator.
An individual object of a certain class. An object obj that belongs to a class Circle, for example, is an instance of the class Circle.
What is operator overloading in python?
None of the answers
The operator is overloaded and explodes
A unique instance of a data structure that's defined by its class. An object comprises both data members (class variables and instance variables) and methods.
The assignment of more than one function to a particular operator.
What is the Python built-in function used to display numbers and text on the screen?
input
output
command
Welcher Code definiert die Klasse Student, die von der Oberklasse Person erbt?
class Student(Person):
Class Student extends Person:
class Student <--Person:
class Student : class Person:
Was wird hier bei print(x.a, x.b) ausgegeben?
10 12
12 10
a b
x.a x.b
Was macht diese Codezeile?
x = A()
Ein Objekt x von der Klasse A erstellen
Der Variablen x den Wert von "A()" zuweisen
Den Parameter A ändern
Klasse A hat den Wert von x nach dieser Zeile Code
Welche Methode der Klasse A wird als erstes beim Erstellen des Objektes aufgerufen?
erstes()
__init__()
zweites()
keine der Methoden
Was wird in dieser Zeile ausgegeben?
print (x.zweites(1,2))
10 12
22
1 2
3
