in the program below, which two variables have the same scope? def subtract(numa, numb): return numa - numb…

in the program below, which two variables have the same scope? def subtract(numa, numb): return numa - numb def divide(numc, numd): return numc / numd answer = divide(24,6) print (answer)

in the program below, which two variables have the same scope? def subtract(numa, numb): return numa - numb def divide(numc, numd): return numc / numd answer = divide(24,6) print (answer)

Answer

Brief Explanations:

In Python, variables defined within a function have local scope limited to that function. numA and numB are local to the subtract function, and numC and numD are local to the divide function. So numC and numD have the same scope as they are in the same function - divide.

Answer:

numC and numD