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 14:30
What percentage of companies is projected to use social media to locate new employees in 2012
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 21:40
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings. for each match, add one point to user_score. upon a mismatch, end the game. sample output with inputs: 'rrgbryybgy' 'rrgbbrybgy'
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 03:30
Auniform resource locator (url) is a formatted string of text that web browsers, email applications, and other software programs use to identify a particular resource on the internet. true false
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 07:30
Consider the folloeing website url: what does the "http: //" represent? a. protocal identifier. b. ftp. c. domain name d. resource name
Answers: 2
You know the right answer?
Questions
![question](/tpl/images/cats/mat.png)
Mathematics, 22.06.2021 22:30
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 22.06.2021 22:30
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 22.06.2021 22:30
![question](/tpl/images/cats/mat.png)
Mathematics, 22.06.2021 22:30
![question](/tpl/images/cats/istoriya.png)
History, 22.06.2021 22:30
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 22.06.2021 22:30
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 22.06.2021 22:30
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/User.png)
SAT, 22.06.2021 22:30
![question](/tpl/images/cats/istoriya.png)
History, 22.06.2021 22:30
![question](/tpl/images/cats/ekonomika.png)
Business, 22.06.2021 22:30