Skip to content

IvailoDimov/Project1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

class Person: def init(self, name, age): self.age = age self.name = name self.age = age

def __add__(self, other_obj):
   p11 = Person()
   return self.age + other_obj.age
    return str(self.age) + other_obj.name = p11.age

def __sub__(self, other_obj):
   p22 = Person()
   return self.age - other_obj.age= p22.age

def __str__(self):
    p33 = Person()
    return "My name is {} ".format(self.name)
def __mul__(self, other_obj):
   p44 = Person()
   return self.age * other_obj.age = p33.age

def __truediv__(self, other_obj):
    return self.age / other_obj.age = p44.age

p1 = Person("Goshko", 15) p2 = Person("Ivan", 14) print(p2) p = Person("Alex", 15) p1 = Person("Pesho", 10) print(p /p1) print(p11) print(p22) print(p33) print(p44)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published