Check sibling questions

Find and write the output of the following python code:


def call():

global a








  • a is initially declared as a global variable and assigned the value 10
  • Then a function call( ) is created where a is assigned the value 15 and b is assigned the value 20. So now, the value of a is updated from 10 to 15 .
  • a is printed when the function is called.
  • So, the output will be 15.

Question 1 - Teachoo.jpg

Learn in your speed, with individual attention - Teachoo Maths 1-on-1 Class

Ask a doubt
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 13 years. He provides courses for Maths, Science, Social Science, Physics, Chemistry, Computer Science at Teachoo.