Post

@Python_Dv 1. Concepts of Global & local variable
2. When is calc() is called, it accesses the return value in the callers. Global variable a = 3, 3 + 2 =5, 5 × 2 = 10 return value = 10
3. Print statement will evaluate to 10 + original global variable (3) = 13
English

@Python_Dv 13. calc(a) has to be solved before the print statement will know what to do.
English

@Python_Dv the function calc add 2 to 'a' that has a value of 2 which gives 4 and then
returns a * 2 = 4 * 2 = returns 8
print(calc(a) + a) print(8 + 2) which prints 10
ans: 10
English

@Python_Dv This function will output who cares Python sucks. Whoever’s idea it was to use tabs instead of a block character should lose their programmer card immediately
English











