Sunday, August 26, 2012

adding two number in python

below is the simple python script to add two numbers



x = input("enter value of x")
y= input("enter value of y")
z=int(x)+int(y)
print("x :"+str(x)+" + Y:"+str(y)+" = "+str(z))


save it as add.py and enjoy

No comments:

Post a Comment