__truediv__


Definition
The operator divide the values.

Syntax
__truediv__

Parameters
number

Examples
The equal to:
 >>> Fraction(1).from_float(1).__truediv__(Fraction(1, 1))
Fraction(1, 1)


complex()__truediv__()
The complex number value obtained through__truediv__:
 >>> complex(2255888+0j).__truediv__(22)
(102540.36363636363+0j)


Fraction.__truediv__()
The equal to following returns:
 >>> Fraction(2.111300).limit_denominator(1).__truediv__(Fraction(2, 1))
Fraction(1, 1)

The fraction is divided by 2.
 >>> Fraction(2,3).numerator.__truediv__(2)
1.0

The division is:
 >>> Fraction(1,1).real.__truediv__(Fraction(1, 1))
Fraction(1, 1)


math.__truediv__(math)
The equation value is determined through input().
import math
import operator
a=float(input("Please enter copysign(x) : "))
b=float(input("Please enter copysign(y) : "))

c=math.copysign(a,b).__add__(1.1).__mul__(math.acosh(2)).__truediv__(math.atan2(88,34))
print("The equation value is", c)

>>> 
Please enter copysign(x) : 2
Please enter copysign(y) : 6
The value is 3.3961966891396522
>>> 

Comments