logo

Crowdly

Browser

Add to Chrome

Програмування мовою Python

Looking for Програмування мовою Python test answers and solutions? Browse our comprehensive collection of verified answers for Програмування мовою Python at learn.ztu.edu.ua.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Яка основна перевага генераторів над ітераторами?

View this question

За допомогою якої функції можна отримати список атрибутів і методів певного класу?

View this question

Яке основне призначення атрибуту  __call__?

View this question

Методи, що не можуть змінювати ані стан класу, ані його примірників називаються:

View this question

Який спеціальний метод повертає строкове представлення екземпляру класу?

View this question

Який результат буде виведено на консоль після виконання наступного модуля?

class Employee:

__num = 0

def __init__(self, firstname, lastname):

self.__firstname = firstname

self.__lastname = lastname

Employee.__num += 1

def emp_number(self):

print(Employee.__num)

a = Employee("Horus","Lupercal")

b = Employee("Garviel","Loken")

print(b.__num)

b.__num = -1

b.emp_number()
0%
0%
0%
0%
View this question

Клас в якому не створюються примірники, а його призначення - визначенняя, які методи і властивості потрібно буде перевизначити в дочірніх класах, називається:

View this question

Який вбудований метаклас є в Python?

View this question

Який результат буде виведено в терміналі після виконання наступної програми?

class Car:

autopilot = False

def __init__(self, model, spead):

self.model = model

self.spead = spead

self.autopilot = Car.autopilot

def is_autopilot(self):

if self.autopilot == True:

print( "Yep! There is an autopilot!")

else:

print("Nope! It's dummy(")

class Tesla:

def __init__(self):

self.autopilot = True

class CleaverCar(Tesla,Car):

def __init__(self, model, spead):

super().__init__()

self.model = model

self.spead = spead

a = CleaverCar("Some_ordinary_car", "Jeez! It's frighteningly fast!")

a.is_autopilot()

View this question

Принцип ООП, згідно з яким складність реалізації програмного компонента повинна бути захована за його інтерфейсом має назву:

0%
0%
0%
View this question

Want instant access to all verified answers on learn.ztu.edu.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome