Question: 3 . 2 2 Lab: Foreshadowing References Here, we investigate what happens when we change the value of a variable in a function. Your instructions
Lab: Foreshadowing References
Here, we investigate what happens when we change the value of a variable in a function. Your instructions are to
define a function that takes a single argument, adds to that argument, and then prints it out all inside the function!
then, outside of the function, print out x call your function using x as its argument, and print out x again
In total, x should be printed out times. Did you get what you expected? We will explain this behavior later in the course.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
