Yep we love teaching Python cuz it's the best language IMHO to teach... simple expressive syntax.
I share the same sentiments! I offer tutorials to my fellow CS students and Python is my go-to language for explaining basic programming constructs.
Ideally though, a student should be well-versed on at least one scripting language (Python, PHP, JS, etc.) and a compiled one (Java, C++, C#, etc.) since some concepts are harder to visualize on certain languages. Like, functional programming is better taught in JS than C++ and pointers are better taught in C than PHP.
Totally agree with you, each lang serves better in explaining some concepts.
A bit regretting that my first lang was C cuz I spent lots of time understanding pointers and arrays instead of going into actual domains problems :D
Same goes to Python, I see many people explaining data structures in Python while in the very beginning they don't solve an actual problem cuz Python has lists already! That's why C is the way to go IMO for data structures.
Currently developing futuristic smart-device, IoT connected, highway construction site safety system in EU.
Used to work on infrastructure, application architecture and cloud engineering.
In for loops you can empoy this little trick to emphasize decrementing from max to 0:
intmax=10;for(i=max;i-->0;){printf(".");}
It is just pretty-formatted i-- > 0
What it does it decrements i and makes sure it's > 0 in the comparison part of the for leaving out the increment/decrement part.
Works the opposite way (end to start) so it's not suitable for processing lists where ascending order matters.
Currently developing futuristic smart-device, IoT connected, highway construction site safety system in EU.
Used to work on infrastructure, application architecture and cloud engineering.
Let's call it a syntactic sugar. It makes the code shorter, more visual while still keeping the same functionality; but may make someone puzzled about what it does on first sight as it's not common.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I share the same sentiments! I offer tutorials to my fellow CS students and Python is my go-to language for explaining basic programming constructs.
Ideally though, a student should be well-versed on at least one scripting language (Python, PHP, JS, etc.) and a compiled one (Java, C++, C#, etc.) since some concepts are harder to visualize on certain languages. Like, functional programming is better taught in JS than C++ and pointers are better taught in C than PHP.
Totally agree with you, each lang serves better in explaining some concepts.
A bit regretting that my first lang was C cuz I spent lots of time understanding pointers and arrays instead of going into actual domains problems :D
Same goes to Python, I see many people explaining data structures in Python while in the very beginning they don't solve an actual problem cuz Python has lists already! That's why C is the way to go IMO for data structures.
In for loops you can empoy this little trick to emphasize decrementing from max to 0:
It is just pretty-formatted i-- > 0
What it does it decrements i and makes sure it's > 0 in the comparison part of the for leaving out the increment/decrement part.
Works the opposite way (end to start) so it's not suitable for processing lists where ascending order matters.
That's a neat trick! But it looks something more of a trick to get the shortest solution to a programming quiz rather than a practical solution, IMO.
Let's call it a syntactic sugar. It makes the code shorter, more visual while still keeping the same functionality; but may make someone puzzled about what it does on first sight as it's not common.