(Jun-05-2018, 08:50 AM)Roshan Wrote: what is wrong with me ?:-) There is nothing wrong with you, I hope... There is problem that you cannot add/concatinate str and int.
Please, always post the entire traceback that you get. Take a time to read What to include in a post.
That said it's better to get use of more advanced string formatting features
def myfunc(self): print("Hello my name is {}".format(self.name)) print("My age is {}".format(self.age))if you are on python 3.6+ you can even use the f-strings
def myfunc(self): print(f"Hello my name is {self.name}.") print(f"My age is {self.age}.")
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs