Question: Consider the following code: @dataclass class Multiplier: num 1 :int = 0 num 2 :int = 0 def getProduct ( self ) : return self.num
Consider the following code:
@dataclass
class Multiplier:
num:int
num:int
def getProductself:
return self.num self.num
def main:
m Multiplier
mnum
mnum
printfmnum X mnummgetProduct
if namemain:
main
What is are the attributes of the class?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
