human
1.13. Object-Oriented Programming in Python: Defining Classes
1.13.1. A Fraction Class"
Please write code following the instructions in jupyter notebook style.

=====
Give me a code to 1?
assistant
#Here is code to 1.

class Fraction:
    
    def __init__(self, top, bottom):
        self.num = top
        self.den = bottom

    def show(self):
     print(self.num,"/",self.den)
    
    # Overriding the default __str__ function
    def __str__(self):
        return str(self.num)+"/"+str(self.den)
    
    def __add__(self,otherfraction):
     newnum = self.num * otherfraction.den + self.den * otherfraction.num
     newden = self.den * otherfraction.den
     return Fraction(newnum,newden)
        
myfraction = Fraction(3,5)
print(myfraction)
print(myfraction.show())
f1 = Fraction(1,4)
f2 = Fraction(1,2)
f3 = f1 + f2
print(f3)