zlacker

[return to "My Favorite Programming Problem to Teach: Digit Length"]
1. svnpen+Jm[view] [source] 2019-11-11 03:14:08
>>jstrie+(OP)
> As a result, solutions using strings are disallowed on problem sets and quizzes until they are taught. However, the few students who have prior Python programming experience may be tempted to find digit length without loops using a variant of the following (for our purposes) invalid solution.

Wow. this is one of the reasons I hated school. No programmatic reason what given for why a string solution couldnt be used, only an arbitrary reason. Here students may have knowledge from self teaching or whatever, but they are unallowed to use that knowledge because "reasons".

To any teacher that thinks its a good idea to punish students for thinking outside the box: shame on you. All youre going to end up doing is crushing enthusiasm and/or creating drones. Please dont.

◧◩
2. ianai+4o[view] [source] 2019-11-11 03:36:15
>>svnpen+Jm
Agreed. I think you could even argue that string manipulation is even more common than uses of math.ceil, floor, the floor division operator (//), and so on. I love math, but this is a programming class.

This also fails my personal rule to always need to have a reason to do something mean - like failing someone on a problem, and no reason to do something nice - like saying it’s fine since it works.

◧◩◪
3. moron4+381[view] [source] 2019-11-11 13:48:28
>>ianai+4o
Drastically depends on the kind of problems you're working on.
[go to top]