-
Notifications
You must be signed in to change notification settings - Fork 274
Sum of Two Integers
codepath-wiki-review[bot] edited this page May 29, 2026
·
9 revisions
TIP101 Unit 1 Session 1 (Click for link to problem statements)
Understand what the interviewer is asking for by using test cases and questions about the problem.
- Do I need to modify the provided function?
- No.
Plan the solution with appropriate visualizations and pseudocode.
General Idea: Use the sum function to calculate a sum, save it to a variable. Then call the sum function again using the originally calculated sum as arguments a and b. Print the final result to the console.
def sum(a, b):
return a + b
summed = sum(13, 27)
result = sum(summed, summed)
print(result) # Output: 80