help with python
you will create a class that represents rational numbers.[fodder: What’s the basis of the name rational number?] Arational number is essentially a fraction, that is it can berepresented as P / Q, where P and Q are both integers. Technically,Q needs to be greater than zero.
Let’s look at some examples of rational numbers:
PQRational NumberDecimal Approximation141/40.25313/13.0727/23.5351035/103.5-12-1/2-0.5272/70.285714…-4-54/50.83-2-3/2-1.560illegalillegal
Notice that there is no requirement that the fraction be in”reduced form”. Also, the fraction can be “improper”, that is thenumerator (top number) can be bigger than the denominator (bottom).That’s why we’re using the term rational numbers, ratherthan fractions.
Also, the Q > 0 requirement
PayPal Gateway not configured
PayPal Gateway not configured