0

Whats wrong with this code

Why am i not getting value of k printed? https://code.sololearn.com/c3C4OKBqm3M0/?ref=app

7th Apr 2020, 7:25 PM
Sagar Gupta
Sagar Gupta - avatar
5 Réponses
+ 1
Tags helped to improve search results as for related topics. You tags JavaScript, python not related to the question. So You declared k in function as local variable so its local to function, you cannot access through class level or not available to object. Declare outside function..
7th Apr 2020, 7:53 PM
Jayakrishna 🇮🇳
+ 1
Sagar Gupta Your welcome.. You have corrected code from Oma Falk. Try that way.
7th Apr 2020, 8:47 PM
Jayakrishna 🇮🇳
0
Its why did Oma Falk
7th Apr 2020, 7:38 PM
Sagar Gupta
Sagar Gupta - avatar
0
Some probs with static and instance variables https://code.sololearn.com/cSzV6w29ENV7/?ref=app
7th Apr 2020, 7:48 PM
Oma Falk
Oma Falk - avatar
0
Jayakrishna🇮🇳 thanks brother...
7th Apr 2020, 8:35 PM
Sagar Gupta
Sagar Gupta - avatar