-4

def sample(a,b): return a+b

num1 = int(input()) num2 = int(input())

res = sample(num1,num2) print(res)

  • 1
    Does this answer your question? [I'm getting an IndentationError. How do I fix it?](https://stackoverflow.com/questions/45621722/im-getting-an-indentationerror-how-do-i-fix-it) tl;dr you need to indent the `return` statement – wjandrea Jul 02 '20 at 17:15

1 Answers1

0

solution:

def solveMeFirst(a,b):
    return a+b

num1 = int(input()) 
num2 = int(input())

res = solveMeFirst(num1,num2) 

print(res)
tupui
  • 5,738
  • 3
  • 31
  • 52
  • 4
    While this code does solve the problem, it would help to add an explanation: Why was OP getting an error? How does this avoid the error? Are there other ways to solve the same problem? You can [edit] your answer. BTW welcome to SO! Check out the [tour] and [answer] if you want more advice. – wjandrea Jul 02 '20 at 17:23