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

If You have any errors put in Comments.

Comments

Popular posts from this blog

alphabet matrix minimum sum path

C--Starter-part007---skillrack