Program to find out absolute value of an input number.
Code:
float = -54.26
print('Absolute value of float is:', abs(float))
int = -94
print('Absolute value of integer is:', abs(int))
complex = (3 - 4j)
print('Absolute value or Magnitude of complex is:', abs(complex))
Output:
Comments
Post a Comment