144k views
13 votes
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

1 Answer

6 votes

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 fu…

✓ def func(a): print(a) a= 8 func(a) #Using parameter outside the function works well without producing any error.

User Gorio
by
4.0k points