4 Program to find out absolute value of an input number in Python

Program:

num = float(input("Enter any Number:")
if num < 0:

    print("Number: ",-num)
else:
    print("Number: ",num)


Output:

absolute value of an input number in Python

Previous
Next Post »