Please use
python 3 to solve the whole question
Instructions: The purpose of this assignment is to learn how to make a class in Python 1. Create a class named rational which will represent a new data type cor- responding to rational numbers. A rational number ?sa fraction where the mumerator and denominator are both integers. Your constructor should create the following variables: - n and d corresponding to the numerator and denominator of the rational mumbers. Default values are n 0, and d 1 And the following functions (or methods) num which returns the numerator of the fraction - denom which returns the denominator of the fraction - convert which returns a double representing the fraction (ie. 3/4 becomes 0.75) - gef which returns the greatest commmon factor of n and d. (Be careful not to change the values of n and d) - reduce which reduces the fraction to its lowest terms (using the ged function above) This function changes the value of n and d Overload the following methods: str. to display the rational number as a fraction to the monitor A fraction like a/1 should be displayed as a, and a fraction like 0/b should be displayed as 0. .-.add -_cub.??nul div_ should be overloaded to perform the appropriate operations (+,-,on rational numbers. When caleulating the new rational number, reduced it to lowest terms (6/8 should become 3/4). These functions sbould work when doing the operation between rational numbers and integers as wl. Also do the raddrsubrrdiv functions . eqneltleg-ge,should be overloaded to perform the appropriate equalities/unequalities/inequalities between rational numbers (!<.>) Bonus: Write a program that uses the rational number class described in problem 2 (whether or not you completed it successfully), for the expansion of the number a described earlier in the semester Ask the user how many terms the user would like to calculate, then display the proper reduced fraction representing the calculation For example, if the user wants 4 terms: 4 4 4430 earn this boaus, whether or not your rational class works correctly. I am only interested in the what you would do if you hada perfectly working rational class. It won't run unless your rational class is defined properly, so testing might be an issue. For full credit, use the rational class as mach as possible (all calculations done with fractions and little or no calculations done between regular pythoa types)