Answer to Question #174666 in Python for bhuvanesh

Question #174666

Write a program to print the absolute difference between the two given numbers. (Absolute difference is the difference without the negative sign)


1
Expert's answer
2021-03-23T04:32:57-0400
a=int(input("Enter first number:"))
b=int(input("Enter second number:"))


if a>=b:
	print("Absolute Difference is",a-b)


else:
	print("Absolute Difference is",b-a)


Output:








Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS