pearceso187446
pearceso187446 pearceso187446
  • 02-12-2020
  • Computers and Technology
contestada

write a program which calculates the difference between two integers which are entered by the user. The answer should be a positive integer regardless of the order in which the integers are entered. ​

Respuesta :

Cytokine
Cytokine Cytokine
  • 02-12-2020

In python 3.8:

print(abs(int(input("Enter a number: "))-int(input("Enter a number: "))))

Answer Link

Otras preguntas

how do I solve x+2y=8
How many eights are there in 6 1/2
A 1700 kg 2006 Mustang GT can accelerate from rest to 100 km/h in a time of 5.0 s.  Determine the net amount of work that must be done on the car to cause this
What is a Mandala Autobiography?
Which statement is NOT true?A.  If two coplanar lines do not intersect, then the lines are parallel.B. Two lines lie in one plane and do not intersect if and on
A transformer has a primary coil with 600 turns and a secondary coil with 300 turns. If the output voltage is 320 volts, what is the input voltage?A. 8 volts
A construction contractor is purchasing granite tiles for a new kitchen floor. Each tile costs $5 and he wants to spend less than $1,500. The size of each tile
What is the difference between displacement and double displacement reactions?Write equations for these reactions?
what city is located 60 north 25 east
1. Why are there active volcanoes along the Pacific coast in Washington and Oregon but not along the East coast of the United States?