2 ms·
Python is a great introductory programming language, but ill-suited to get people to understand computer science underpinnings, mainly because there's such a di
by necovek 6y ago
Python is a great introductory programming language, but ill-suited to get people to understand computer science underpinnings, mainly because there's such a discrepancy in performance of C-based Python structures compared to pure Python (eg. list.append vs list.insert in large lists, string copying on change, list/set/dict comprehensions vs for-looping which you hint at).
I know at that age I was already getting acquainted with the big-O notation and such, and C-pointer arithmetic was already second nature, but it sounds like you are looking for something not-really-CS: so it'd be best if you elaborate on what are you actually teaching a 16 yo student, or what goals does that 16 yo student have?
If it's just about getting someone interested in building programs for themselves, I find the most important thing is to keep the motivation, which means finding a project they care about ("let's sort your gallery into folders"), and Python is an excellent choice for that.
But I wouldn't focus on specifics you mention, because they are so... well, specific to Python data structures and control flow. And then you can use NumPy structures to solve an entirely different set of problems.
- fdeage 6y agoHi, sorry for the delayed response. Sure, it's not gonna teach as much as C about performance or how computers work. It's used mainly to introduce algorithmic concepts and basics of imperative programming. And I agree with you that Python is a great choice for that.