Create a function calculation () such that
it can accept two variables value and calculate
the addition and subtraction of them. And also it
must return both addition and subtraction in a
single return call.
code:
def calculation(x,y):
addition = x+y
subtraction = x-y
return addition,subtraction
c,d = calculation(20,10)
print("addition and subtraction of number is: ",c,d)
output:
addition and subtraction of number is: 30 10
#pythonlearning #computerscience #coder #phyton #python3 #pythoncode #pythonprogramming
Watch video Python Function | addition and subtraction | python programming | tutorial online without registration, duration hours minute second in high quality. This video was added by user Mangesh Bagul 16 February 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 12,395 once and liked it 298 people.