Answer to Question #237080 in Python for Joel

Question #237080

Call your function with a local variable . Show what happens when you try to use that variable outside the function . Explain the results.


1
Expert's answer
2021-09-14T18:05:02-0400
def fun():
    x = 3
print(x)

 it will produce an error

x is not defined


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