Computer Science, asked by hemanthprabhu2003, 5 months ago

x = 50
def func(x) :
x = 2
func(x)
print(‘x is now’,x)

Answer is

x is now 50 but I don't understand why it's not saying x is now 2 as we called function Function(x) please explain?

Answers

Answered by keerthanabg2006
3

Answer:

x is now 50

Explanation:

because printf should be written and x is not particular defined

Answered by anjumanyasmin
2

From the given question the correct answer is :

Reason behind why it's not saying x is now 2 as we called function Function(x)   is because x is not defined particularly.

always first command will run first.and there is mistake in command print it should be printf.

Similar questions