Make a program in Python that accept two integer values. If the first number is higher than the second display the computed difference, otherwise display the computed sum.
Answers
Answered by
1
Answer:
a=float(input("Enter a number:"))
b=float(input("Enter a number:"))
if(a>b):
result=a-b
print(result)
else:
result=a+b
print(result)
Explanation:
l've used float in case if u want to input any decimal no.
make sure that result is not entered inside " "
l do hope this works out 4 u :)
Similar questions
Political Science,
1 month ago
Math,
1 month ago
Chemistry,
3 months ago
Math,
3 months ago
Social Sciences,
8 months ago
English,
8 months ago