[Tutor] Help

Magnus Lyckå magnus@thinkware.se
Sat Apr 19 10:29:01 2003


At Wed, 16 Apr 2003 23:05:30 -0700 (PDT), "Y.T. H." <hsiehson5@yahoo.com> 
wrote:
>Dear Sir,
>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;

Surely.

>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:

Neither. You use pipes and faucets etc for flow control.
These are all programming constructs.

>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)

SyntaxError

>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

Neither. The purpose of the cgi module is to make life
easier for cgi programmers.

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

All of the above, slightly depending on *what* you want to
be fast and efficient. (Your work or the computers.)

Dear Andy, I'd like to ask *you* something:

What are your current career plans? Get a diploma and
then live on social welfare money? You don't honestly
think you will get a job unless you actually learn stuff,
do you? Maybe in the rush around 1998-2000, but not after
that...

Surely you aren't so confused that you imagine that
you can *learn* programming by having someone else do
your homework. (Surely noone is *that* daft, even if
sending this mail showed that you are less smart than
one could expect from someone who is studying programming.)

BTW, in my school we could get expelled for cheating.

Shall we forward this to the education mailing list?
Most professors teaching Python are subscribed to that,
right? Although that might not be needed. A lot of them
are subscribers her as well I guess.


--
Magnus Lycka (It's really Lyck&aring;), magnus@thinkware.se
Thinkware AB, Sweden, www.thinkware.se
I code Python ~ The shortest path from thought to working program