+ 1

What is the error in this code?

It's showing an error https://code.sololearn.com/c84bnt7JqgFn/?ref=app

30th Aug 2021, 5:45 PM
Mike
3 Answers
+ 7
Mike , Md. Faheem Hossain , please have a look at the code. i have slightly reworked the show() method. see my comments in the code: https://code.sololearn.com/cZXF0wr37yf5/?ref=app
30th Aug 2021, 7:23 PM
Lothar
Lothar - avatar
+ 5
* show() needs a self attribute * in show() iterate directly through self.names – the method cannot know args
30th Aug 2021, 6:04 PM
Lisa
Lisa - avatar
+ 4
Have a look at the changes I've made in the code: https://code.sololearn.com/cToMlatMd9bb/?ref=app . Hope now it's working as you expected.
30th Aug 2021, 6:55 PM
Md. Faheem Hossain
Md. Faheem Hossain - avatar