[Tutor] Help

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Fri Apr 18 18:34:01 2003


On Wed, 16 Apr 2003, Y.T. H. wrote:

> This is Andy from Sydney University. I have come across to a few
> questions that I am wondering if you'd be so kind to give me some
> suggestion;


Dear Andy,

We help people who want to learn computer programming using Python.  For
people who are genuinely trying to learn and play with the language, we
are happy to help.


But I think you're misunderstanding our role here: we are not here to do
your homework.  A university student is expected to do more than parrot
the answers of other people.  And you are expected to do more.



> 1>Which of the following Python statements is NOT used
> for flow control.
> a> a,b = 0,1
> b> if x < 0:
> c> while b< 1000:
> d> for x in a:

Counter question: what is a "flow control" statement?  What does the term
"control flow" mean to you?  What problem did you have with this question?




> 2>What output will the following string parsing code
> be?
>
> mystring="the quick brown fox jumped over the lazy
> dog"
> print left(mystring,instr(mystring,"fox")-1)

What problems are you having with this?  Have you been able to run this in
your interactive interpreter?  What problems do you have when you actually
try this from the interactive prompt?  What does 'left' and 'instr' mean
in the statement above?




> 3>What is the principle purpose of a python cgi
> module?
> a> to process the contents of an HTML page
> b> to generate forms containing name/value
> querystrings or form variables
> c>to process in a Python script Name/Value pairs from
> an HTML form or query string
> d>to dynamically create HTML

I don't understand the question here.  Why are you giving us multiple
choice answers for this?  Where are YOUR questions?  Again, what problems
did you encounter while trying to answer this?



> 4>A scripting language is generally,
> a> Interpretive
> b> Used to build complex applications
> c> Fast and efficient
> d> Loosely typed

Again, the choice of giving us multiple choice answers is an odd one: what
are you asking us to do?


Please forgive me for my accusatory and harsh tone, but your questions are
homework exercises.  Perhaps you did not mean to do this, but to ask a
public forum to do your homework assignment for you is not only
demoralizing for the volunteers here, but personally insulting to all of
us.



If you really do want to learn about Python, we strongly suggest you look
at the introductory web page:

    http://python.org/doc/Newbies.html

and work through a tutorial.  The tutorials on that page are valuable
resources that you can use to learn ideas of programming, but they require
your active effort.



Sincerely,
Danny Yoo