Python Function | addition and subtraction | python programming | tutorial

Published: 16 February 2022
on channel: Mangesh Bagul
12,395
298

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.