其他运算都没有问题,但除法会报错,我用的Python3试的
python3 为什么我算除法的时候回报错呢? ====================== RESTART: C:\Users\h\Desktop\1.py ====================== >>> r1 / r2 Traceback (most recent call last): File "
", line 1, inr1 / r2 TypeError: unsupported operand type(s) for /: 'Rational' and 'Rational'#0>