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

Question:

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

Hints:

  • Use int() to convert a string to an integer.

Solution:

def printValue(s1,s2): print int(s1)+int(s2) printValue("3","4") #7
Code language: Python (python)

Leave a Comment