Saturday, 26 September 2020

Learn Python: Adding function and two numbers

Adding function

#function definition
def addition():
    x=10
    y=20
    z=x+y
    print("Sum=",z)

#function calling
addition()

Addition of two numbers

  #taking user input
x=int(input("Enter first number:"))
y=int(input("Enter Second number:"))
z=x+y
print("Addition of two number:",z)
"""
***Output***
Enter first number:12
Enter Second number:13
Addition of two number: 25
"""   

Beneficial information

Shipwreck more tragic than Titanic

Watch video to know: Shipwreck more tragic than Titanic https://youtu.be/7IVaHgxHU20

Impact-Site-Verification: b5ea34f9-4d6d-4198-89d2-2740a9156405