Answer to Question #210696 in Python for joy

Question #210696

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
Expert's answer
2021-06-25T16:08:44-0400
def func(x):
    print(x)
x= 8
func(x)
Using parameter outside the function may just work well without producing any error. F
For example the func function will just output 8 without producing any error.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS