subject

Which line of code will use the overloaded multiplication 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)

Which line of code will use the overloaded multiplication 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)

a) product = numA * numB
b) product = numA. multiply(numB)
c) product = numA. mul(numB

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 07:00
You need a quick answer from a coworker. the most effective way to reach your coworker is through a. cloud server b. instant message c. teleconference d. telepresence
Answers: 1
question
Computers and Technology, 24.06.2019 01:00
Me if you do then you get 10 points and brainliest
Answers: 1
question
Computers and Technology, 24.06.2019 09:30
Atype of researcher who uses computers to make sense of complex digital data
Answers: 1
question
Computers and Technology, 24.06.2019 23:00
The valves of the heart and veins are similar in that they both
Answers: 1
You know the right answer?
Which line of code will use the overloaded multiplication operation? class num:
def __init__...
Questions
Questions on the website: 13722363