DC May 23
DEFINE CLASS STICK:
class Stick:
def __init__(self,value):
self.value=value
def __add__(value1,value2):
str1="Length: "+str(value1.value+value2.value)
return (str1)
In the Second and Fourth Line, Double underscores are there don't put single Underscore
Comments
Post a Comment