[Tutor] Python help please

Alan Gauld alan.gauld at btinternet.com
Tue Mar 23 01:13:57 CET 2010


"laura castaƱeda" <laura_casta21 at hotmail.com> wrote

> Hi my name is Laura and im currently trying to solve one of the
> challenges in the book: "Python Programming, ...
> if u can help me with it. Right now im trying to teach my self
> programming and i found the book really useful

Hi feel free to sitgn up to the tutor list, that way your posts will
go through a lot quicker  - and the answers will therefore
come back quicker too :-)

> ...in the code i was thinking to start with a "while loop"

Your ideas are all good.
Get the data structures/variable set up, then iterate in a while loop
adding and subtracting points from the pool to the character.
Its a little like double entry book-keeping - for every addition
there must be a corresponding subtraction and vice versa

If you have a list of characters you will need a corresponding
list of pools - or associate the pools with the characters - a
dictionary maybe?

Start with one character and try getting the most basic version
running. If you get stuck show us the code plus any error
messages and ask...

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/ 




More information about the Tutor mailing list