[Tutor] first call - newcomer

Alan Gauld alan.gauld at btinternet.com
Mon Oct 6 10:38:14 CEST 2008

"Anthony Smith" <gods_bud666 at hotmail.com> wrote

> This is my first post - I will be brief...

Hi, welcome to tutor :-)

> 1.  A brief (but complete) description regarding the use of script
> editor (I will be using command prompt in Windows), as:

Brief and Complete don;t normally go together!
If you are using IDLE then Danny yoo's intro is a good place to start.
The IDLE section of the Python web site has a more detailed run
through oof the faciilities.

         a.  details about loading and saving programs (not in that 
order) and little
              specs about pathnames or other requirements (I will 
probably store all
              my little goodies in one folder or space).

As to paths:

PATH should be set to the folder where the Python interpreters live
PYTHONPATH should be set to include the folder where your code lives

> 2.  I have been unable to locate the gizmo in the literature to get 
> ascii codes
>     in python.

chr(n) is the function you need
ord(c) is the one in the opposite direction


>    was PRINT VAL(A$) or something.

Python will generally figure out what you want to print without
explicit conversions, certainly fewer than you will be used to
from the early BASIC versions.

>     assign a number to a word (using a simple algorhythm that will 
> give a
>     specific number to every word).  Other stuff is pretty easy to 
> find with
>     the book and on-line literature.  I will need to get an ascii 
> code out of
>     a string (whose content is not known to the programmer, as 
> raw_input).
>     Then to assign, I will need the actual list with assigned 
> numbers.

OK, You lost me here.
Can you give an example of what the data would look like?


Alan Gauld
Author of the Learn to Program web site

More information about the Tutor mailing list