3
answers
2
watching
536
views

Example 1: Define a function that takes an argument. Call the function. Identify what code is the argument and what code is the parameter.

Example 2: Call your function from Example 1 three times with different kinds of arguments: a value, a variable, and an expression. Identify which kind of argument is which. 

Example 3: Create a function with a local variable. Show what happens when you try to use that variable outside the function. Explain the results.

Example 4: Create a function that takes an argument. Give the function parameter a unique name. Show what happens when you try to use that parameter name outside the function. Explain the results.

Example 5: Show what happens when a variable defined outside a function has the same name as a local variable inside a function. Explain what happens to the value of each variable as the program runs.

For unlimited access to Homework Help, a Homework+ subscription is required.

Unlock all answers

Get 1 free homework help answer.
Already have an account? Log in
Avatar image
Read by 2 people
Already have an account? Log in
evelyn-6
evelyn-6Lv2
29 Apr 2021
Already have an account? Log in

Related questions

Weekly leaderboard

Start filling in the gaps now
Log in