NameError:name(method) is not defined!!! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

NameError:name(method) is not defined!!!

Hallo everyone, Can somebody tell me why I am getting this error"NameError:name(get_initialen() is not defined!!!"? I am trying to retrieve a methode in the another methode, but it doesn't work. Code: def get_employee_id(self): a=""+get_initialen() print("My name ",self.name,self.surname,"(alias",a,")") def get_initialen(self): v=self.vorname[0:1] n=self.nachname[0:1] alias=""+v+"."+n return alias

29th Jun 2019, 11:02 AM
Preet
1 Answer
+ 2
define get_employee_id() after get_initialen()
29th Jun 2019, 12:12 PM
Choe
Choe - avatar