Which line of code will use the overloaded addition operation?
class num:
def __init__(self,...
![Computers and Technology](/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)
![answer](/tpl/images/cats/otvet.png)
Answers: 2
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 13:30, valeriegarcia12
Select the correct answer from each drop-down menu. which types of computer networks are bigger as well as smaller than a man? a man is a network of computers that covers an area bigger than a , but smaller than a .
Answers: 1
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 19:40, Latoyajenjins1789
Use a physical stopwatch to record the length of time it takes to run the program. calculate the difference obtained by calls to the method system. currenttimemillis() just before the start of the algorithm and just after the end of the algorithm. calculate the difference obtained by calls to the method system. currenttimemillis() at the start of the program and at the end of the program so that the elapsed time includes the display of the result. use the value returned by the method system. currenttimemillis() just after the end of the algorithm as the elapsed time.
Answers: 3
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 20:00, shadow6728g
How much current flows through the alternator brushes? a. 2β5 a b. 25β35 a, depending on the vehicle c. 5β10 a d. 10β15 a
Answers: 2
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 03:00, SiegeHatake4534
Will do anything for brainlest so can you guys me out i will try my best to you out
Answers: 1
Do you know the correct answer?
Questions in other subjects:
![Konu](/tpl/images/cats/en.png)
![Konu](/tpl/images/cats/biologiya.png)
Biology, 09.10.2019 10:50
![Konu](/tpl/images/cats/mkx.png)
Arts, 09.10.2019 10:50
![Konu](/tpl/images/cats/istoriya.png)
History, 09.10.2019 10:50
![Konu](/tpl/images/cats/en.png)
English, 09.10.2019 10:50
![Konu](/tpl/images/cats/informatica.png)
Computers and Technology, 09.10.2019 10:50
![Konu](/tpl/images/cats/en.png)
![Konu](/tpl/images/cats/geografiya.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 09.10.2019 10:50
![Konu](/tpl/images/cats/istoriya.png)
History, 09.10.2019 10:50