Python‎ > ‎math‎ > ‎

math.copysign()

http://www.adilwaseem.com/

Introduction
The method will returns the y value with x sign.

Syntax
math.copysign(x,y)

Parameters
Number

Examples
 >>> import math
>>> math.copysign(44,21)
44.0
>>>

input(math.copysign())
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