Python Functions, Packing, and Unpacking Getting Info In and Out of Functions Arguments and Parameters

mohan Abdul
PRO
mohan Abdul
Pro Student 1,334 Points

why isn't the output 7, instead the output is 5.

why isn't the output 7, instead the output 5

1 Answer

Sean T. Unwin
MOD
Sean T. Unwin
Treehouse Moderator 28,623 Points

The variable, num is printed before the addition is done. Essentially, it's passing the initial value of the parameter passed to the function.