some problems for an introductory python test

Dennis Lee Bieber wlfraed at ix.netcom.com
Wed Aug 11 19:19:44 EDT 2021


On Wed, 11 Aug 2021 09:27:38 -0300, Hope Rouselle <hrouselle at jevedi.com>
declaimed the following:



>
>I wouldn't.  This is all Python-stuff.  The course chooses a language
>like Python, but it is not trying to teach Python --- it is trying to
>teach computer programming, that is, strategies in high-precision.
>

	Then I would posit you are teaching the wrong level... What you
describe is what would be found a "data structures" and/or "algorithms"
course -- which is a second year, if not third year course in my (ancient)
history. Such a course presumes one already knows at least on programming
language well enough that they can take description of an algorithm (or
even more detailed, pseudo-code) and translate it into the language they
know. This means the students /must/ know basic if/then/else, iterative
looping (which may, at common core, mean coding with a numerical index,
rather than pulling objects themselves out of the indexable structure --
since not all languages support object iteration), conditional looping
(including how to turn a "repeat/until" into the equivalent "while" (I was
tempted to say "while/wend" but that is specific to languages that need
block terminators). Slicing with a stride isn't really useful to most
algorithm development -- it's more of trick in normal Python.

	So... The first thing I would drop is the RESTRICTION to only use what
you've covered in prior sessions... Let the students read the language
reference manual, peruse the library reference manual, and allow them to
use whatever "advanced" techniques they are able to understand on their
own. Granted you may have to restrict some features if discussing a
"common" data structure (queue, stack, maybe even advanced list
manipulation -- allow pop() and del, as those are how one would implement
queue and stack). Same for sorting -- if covering bubble, insertion, heap,
and (horrors) multipass sort/merge using working files, obviously the
Python sort()/sorted() are off-limits.

	For my Algorithm/Data Structure course (circa 1978), the instructor
allowed us to use any language /he/ could understand (so no SNOBOL). At the
time I'd gone through intro/advanced FORTRAN-4, intro/advanced COBOL, Sigma
Assembly, UCSD Pascal (not on the campus main computer, just a pair of
LSI-11s), and BASIC. The assignment was a "Hashed Head, Multiply-Linked
List". I chose to do that assignment using BASIC! In nearly 45 years, I've
only seen ONE real-world implementation of the HHMLL -- The file system
used by the Commodore Amiga. (Hash the first component of the path/name,
that maps to one of 64 entries in the root directory block; each entry
points the start of a linked list, follow the list until you reach the
block with the component name; if it is a directory block, hash the next
component and repeat; if it is a file block, the "entries" point to data
blocks instead of lists)



-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
	wlfraed at ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/



More information about the Python-list mailing list