tgoop.com/coding_interview_preparation/997
Create:
Last Update:
Last Update:
Let’s analyze the Python code snippet from the image:
python
Copy
Edit
def add_n(a, b):
return (a + b)
a = 5
b = 5
print(add_n(4, 3))
Step-by-step explanation:
A function add_n(a, b) is defined to return the sum of a and b.
The variables a = 5 and b = 5 are declared but not used inside the function call — they are irrelevant in this context.
The function is called with explicit arguments: add_n(4, 3), so:
python
Copy
Edit
return 4 + 3 # = 7
✅ Correct answer: C. 7
BY Coding interview preparation

Share with your friend now:
tgoop.com/coding_interview_preparation/997