+ 1

Please guys, if one wants to write a program that will ask the user to enter two numbers x and y, and computes it as |x-y|/x+y

The programming language am using is 'python' Pls I need your help

23rd Oct 2020, 6:37 AM
Abioye Olajide
3 Respuestas
+ 1
import math x=int(input()) y=int(input()) print(math.abs(x-y)/x+y)
23rd Oct 2020, 6:41 AM
Abhay
Abhay - avatar
+ 1
x = int(input()) y = int(input()) print(abs(x-y)/(x+y)) #May It Helps You 😊
23rd Oct 2020, 7:11 AM
Hacker Badshah
Hacker Badshah - avatar
+ 1
Abhay no need to import math abs is a built-in function
23rd Oct 2020, 7:13 AM
Hacker Badshah
Hacker Badshah - avatar