Post

Kode Gurukul
Kode Gurukul@kodegurukul·
Answer is 20 Here the value variable is declared before the function call but inside the function the value variable is not modified, simply returned as it is. So it remains the same 20.
Kode Gurukul tweet media
English
1
0
8
649
Danny_
Danny_@dannycgd·
@Python_Dv B. 20 The “return value” makes it 20 still despite the increment in the sum function x+=1
English
0
0
2
198
Prem Prakash
Prem Prakash@4EverPrem·
@Python_Dv 20. value is also defined outside the function sum in line 4 & assigned 20, making it a global variable, hence printing 20
English
0
0
2
333
Esteban
Esteban@esteban_use2011·
@Python_Dv 20 because the program not return x, else it return value
English
0
0
0
62
Seal Aviation
Seal Aviation@MatthewTheSeal·
@Python_Dv Undefined! Value was not defined in the function. Only X!
English
0
0
0
1
MarcoHernandez
MarcoHernandez@Hmarco61213·
@Python_Dv 21, dont know too much, but.. 1. return value didnt have an(x)
English
0
0
0
1
Ni_
Ni_@nikkitapandey1·
@Python_Dv The ans is 20 :)
English
0
0
0
39
X00n1x
X00n1x@x00n1x·
@Python_Dv It does not return x but it return value which is 20.
English
0
0
0
126
wanderlust
wanderlust@wanderl89064087·
@Python_Dv sum returns value, which is 20. x has got no conn whatsoever. so answer is 20.
English
0
0
0
246
Shiv
Shiv@Shiv27870148·
@Python_Dv Sum is a predefined module in python
English
0
0
0
61
شیئر