Jan-12-2018, 10:59 PM
(Jan-12-2018, 08:31 PM)Gribouillis Wrote:(Jan-12-2018, 07:33 PM)mpd Wrote: you can have simple, extensible examples without using classes.It may be true, but this is for expert programmers, and there is little benefit in not using classes.
I think you've lost track of the OP's goals:
Quote:I'm a teacher and I just began learning Python so I can show some tips to my students.
I'm not suggesting the OP build an extensible game framework without using classes. I am suggesting that, when writing small programs to "show tips to students", you can -- and probably should -- do it without classes. After all, if the students have not seen a computer program before (the OP wasn't clear about that but I'm guessing this is the case), they're going to have to learn what a variable is, what s function is, what a loop is, etc.
Why add classes to that out of the gate when you don't have to?
Quote:Well, I don't think classes are difficult to understand and to use.Neither do I but when I was a CS teaching assistant and tutor I encountered a lot of people for whom classes were very difficult to wrap their heads around.