Header Ads

Define a function that can receive two integral numbers in string form and compute their sum and then print it in console In Python

Define a function that can receive two integral numbers in string form and compute their sum and then print it in console.

Define a function that can receive two integral numbers in string form and compute their sum and then print it in console In Python
Hints:
Use int() to convert a string to integer.

Solution:
def printValue(s1,s2):
            print int(s1)+int(s2)
printValue("3","4") #7

Powered by Blogger.