[Tutor] Very basic help [we don't do homework / module usage]

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Sun Jan 26 14:59:03 2003


On Sat, 25 Jan 2003, Gary Calvert wrote:

> I am an IT student that is taking a Python programming class and I am
> having some difficulty.  This class is a math based programming class
> that requires all math problems to be solved in Python.
>
> My last assignment requires writing a module and running all of the
> calculations in the module.  I have attached the code that I have
> written can anyone help.

Hi Gary,

This is a somewhat sensitive issue for us: we are not supposed to help
with homework assignments.  At the very least, you should not just send us
code on us, and ask us for help --- it makes it sound like you just want
us to do your homework!  Forgive me for stating it that bluntly.  You may
not have implied us to do your work in your question, but without telling
us more, it's possible for us to assume the worse.

You need to tell us approximately where you are getting stuck, and what
parts appear to be working for you, what error messages you've gotten, and
what you suspect might be the problem.

These questions are not useless: they are very crucial for us since we'll
have a better idea of what's going on in your head.  We'll still be
limited to what we can help you with, but at least we'll be better
equipped to point you toward resources that directly address your
questions, rather than just spout something generic that might be less
helpful for you.



In the absence of information, I've got to spout.  I did take a look at
your code; it looks fairly reasonable.  Were you having problems with the
'import' of your module, or with the use of the functions in the module?
What have you read about modules so far?

There a section in Mark Pilgrim's "Dive into Python" tutorial that might
help you:

    http://diveintopython.org/fileinfo_fromimport.html

as well as a chapter about modules in the Official Python Tutorial:

    http://www.python.org/doc/tut/node8.html

Both may be useful in showing you how to use modules.



If you run into any problems, or if there's points which seem turgid and
confused, please feel free to ask questions on Python-tutor; we'd be happy
to chat and try to clear the air.