some problems for an introductory python test

Avi Gross avigross at verizon.net
Wed Aug 11 17:31:31 EDT 2021


This conversation has, of course, veered away from the original question so
I am starting afresh.

My memory of the original question is about how one sets up a test for
material covered in class or associated materials for what sounds like a
beginner class. I am not sure whether this would be the place for anyone to
ask such a question, especially as we have no real idea what was taught and
expected. Python is too rich a language and can be taught all kinds of ways
including many that largely ignore object-orientedness or other ways that
professionals use and appreciate.

There are lots of others who have taught such classes and plenty of books.
One can look to see what kinds of questions they use, and, where allowed,
borrow some, suitably adjusted. Any textbooks actually used for a course may
be an excellent place to start.

When I have taught, I like to do things incrementally. Tests are made up
based on what is talked about and stressed, perhaps with harder questions
asking for some innovation. So you may end up teaching how to do some things
without loops such as the example where you largely repeat some code in-line
five times. You might show how to do the same thing using dreaded
GOTO-statements in the OLD days but rarely now. Nowadays you might introduce
while loops or their repeat/do/for variants. In Python, you may well
introduce abbreviated variants such as list comprehensions.

So if testing the above, it is fair to specify in a question what NOT to
use. You can ask for no use of loops, or you can specify you want them to
use nothing but methods X or Y and so on. And since there are so many
modules out there, you might specify that no importing is allowed as that
defeats the purpose. I mean, if the purpose is to teach them how to
logically write a program that implements an algorithm as compared to just
calling a function already made.

As noted, some very decent projects are simply asking the student to create
something others have already done and one way to test how well they did it
is to compare the output of their work with a debugged solution.

Real programmers may at some point shift to using all kinds of constructs
that help them write lots of code faster and with fewer errors but beginner
students need something not very low level (like assembler?) but also not
very high level, I would think.

But debates about object oriented are fine for us philosophers but not
really of much use for the question I thought was asked.




More information about the Python-list mailing list