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. lilyba+tv[view] [source] 2019-11-11 05:25:59
>>svnpen+Jm
> No programmatic reason what given for why a string solution couldnt be used, only an arbitrary reason

The entire problem is arbitrary. It's not a real-world problem looking for a solution. It's a programming exercise.

◧◩◪
3. ruroun+Bx[view] [source] 2019-11-11 05:59:23
>>lilyba+tv
I think it is more of a math exercise solved via programming. Which is somehing I am not particularly fond of.

These crop up all the time in those online programming challenge things.

They are usually maths problems (e.g. Find the combined area of two partially intersecting squares based on their coordinates of a,b,c,d and w,x,y,z) where the solution is done via programming but most of the work is, in my opinion, figuring out the maths which is testing for the wrong thing.

◧◩◪◨
4. raegis+5H[view] [source] 2019-11-11 08:46:37
>>ruroun+Bx
Many things people consider "programming" but not mathematics are things we actually study in mathematics classes. They're just unaware.
[go to top]