Computer Science, asked by ElegantMermaid, 19 days ago

Write the output of the following:
num1 = 4
num2 = num1 + 1
num1 = 2
print (num1, num2)


Please answer as fast as possible..
DON'T SPAM❌❌

Answers

Answered by kingofself
2

Answer:

print(num1,num2)

Explanation:

num1 = 4

num2 = num1 + 1

num1 = 2

print (num1, num2)

given,

num1 = 4    

num2 = num1+1    //num2 = 4+1 = 5  (num1= 4)

num1= 2   //num1 has assigned a new value of 2

print(num1, num2)    

//num1 has now the value of 2 and num2 has value of 5.

ANSWER: 2 , 5

Similar questions