+2

a=abs(k) what is the value of a if k is a constant? And a in case of k is a string.

9/6/2018 3:35:31 AM

Hari Krishna Sahu

1 Answer

New Answer

+6

constant: from math import pi print(pi) # output 3.14159 etc. print(-pi) # output -3.14159 etc. print(abs(-pi)) # output 3.14159 etc. string: print(abs("xyz")) # output TypeError