Which line of code will use the overloaded addition operation?
class num:
def __init__(self,...
![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 09.04.2021 01:30 Kicanty20
Which line of code will use the overloaded addition operation?
class num:
def __init__(self, a):
self. number = a
def __add__(self, b):
return self. number + 2 * b. number
def __mul__(self, b):
return self. number + b. number
def __pow__(self, b):
return self. number + b. number
# main program
numA = num(5)
numB = num(10)
1)result. add(numA, numB)
2)result = numA + numB
3)result = numA. add(numB)
![ansver](/tpl/images/cats/User.png)
Answers: 2
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 07:30
Events and conditions that happen within an organization that are somewhat easier to deal with when responding to change are called
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 19:00
If your accelerator suddenly gets stuck what should you do
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 07:00
Why would a business likely use a java applet - to back up their data files for the business - to create a program that a customer can launch in their web browser - to create music on a powerpoint presentation - to organize files on their company directory
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 19:00
Luis is cloud-based( microsoft bot framework). true false
Answers: 1
You know the right answer?
Questions
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/istoriya.png)
History, 24.09.2019 13:50
![question](/tpl/images/cats/istoriya.png)
History, 24.09.2019 13:50
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 24.09.2019 13:50
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.09.2019 13:50
![question](/tpl/images/cats/en.png)
English, 24.09.2019 13:50
![question](/tpl/images/cats/biologiya.png)
Biology, 24.09.2019 13:50
![question](/tpl/images/cats/biologiya.png)
Biology, 24.09.2019 13:50
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/geografiya.png)
Geography, 24.09.2019 13:50
![question](/tpl/images/cats/obshestvoznanie.png)
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 24.09.2019 13:50
![question](/tpl/images/cats/obshestvoznanie.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/mat.png)