I teach the course "Introduction to Computer Programming" for first-year students of mathematics. It must be assumed that this is the first publication of students for computer programming. Here are the main goals of my training:
- Students should learn and understand the basics of Python.
- In the end, they need to learn enough Python tools so that they can choose the right tool for the problem.
- At the same time, they should learn basic problem-solving skills using computer programming.
My teaching method is to give each new concept a whole series of problems and teasers that motivate students. For example, when entering strings and lists, the natural question is to search through strings or lists. If I ask students to write code that will check if the string is a palindrome, then Iβd better tell them how to cancel it.
For lists, the natural solution myString.reverse() has at least two drawbacks:
- This does not wrap onto lines.
- Students will see magic unless they first talk about methods.
The real question is: how should the string reversal problem be introduced in Python?
source share