Skip to content

Instantly share code, notes, and snippets.

@Areahints
Last active May 28, 2019 21:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Areahints/3e645704bd56387665314d5e28434ffd to your computer and use it in GitHub Desktop.
Save Areahints/3e645704bd56387665314d5e28434ffd to your computer and use it in GitHub Desktop.
Hackerrank Algorithms Python3

Complete the function solveMeFirst to compute the sum of two integers.

Function prototype:

int solveMeFirst(int a, int b);

where,

  • a is the first integer input.
  • b is the second integer input

Return values

  • sum of the above two integers

Sample Input

  • a = 2
  • b = 3

Sample Output

5

Explanation

The sum of the two integers a and b is computed as:2 + 3 = 5

Solution

def solveMeFirst(a,b):
	# Hint: Type return a+b below
    return a + b

num1 = int(input())
num2 = int(input())
res = solveMeFirst(num1,num2)
print(res)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment