Re: [Tutor] (no subject)

2009-09-13 Thread bhaaluu
Go for it! 8^D On Sun, Sep 13, 2009 at 7:45 PM, shellc...@juno.com wrote: > I want to take two tuples and and print out all the elements in both tuples > > > Best Weight Loss Program - Click Here! > http://thirdpartyoffers.juno.com/TGL2

Re: [Tutor] Pygame

2009-07-24 Thread bhaaluu
On Thu, Jul 23, 2009 at 11:49 AM, David wrote: > Hi, > > there also is: > "Invent Your Own Computer Games with Python", which apparently does not > use pygame (like Dawson). > http://pythonbook.coffeeghost.net/ > > I can't comment on the quality. > > David > I have looked through almost half of th

Re: [Tutor] Pygame

2009-07-20 Thread bhaaluu
On Mon, Jul 20, 2009 at 6:00 AM, David wrote: > Mazhar, > > bhaaluu wrote: >> Python Programming for the Absolute Beginner Second Edition. >> Michael Dawson. >> Boston, MA: Thomson Course Technology, 2006. >> ISBN-13: 978-1-59863-112-8 >> ISBN-10: 1-59863-

Re: [Tutor] Pygame

2009-07-20 Thread bhaaluu
Python Programming for the Absolute Beginner Second Edition. Michael Dawson. Boston, MA: Thomson Course Technology, 2006. ISBN-13: 978-1-59863-112-8 ISBN-10: 1-59863-112-8 No experience required to learn Python programming. This book will teach you the basics of Python programming through simple g

Re: [Tutor] GUI recommendations/tutorials?

2009-06-10 Thread bhaaluu
Have you looked at PyGame yet? http://www.pygame.org/ On Wed, Jun 10, 2009 at 12:05 PM, taserian wrote: > I think I'm ready to start working with some simple graphic output. > Currently, I've got the basics of a Python program that calculates full > tours of a honeycomb structure, going through ea

Re: [Tutor] Find a good linux distribution with python.

2009-05-24 Thread bhaaluu
On Sun, May 24, 2009 at 4:02 PM, Michael Bernhard Arp Sørensen wrote: > > What distro do you run? > Debian GNU/Linux > > Another point: There's so many modules on the Internet, that it's difficult > to get some sort of overview. That's why a distro is such a great idea > because so many packages

[Tutor] Fwd: Yet another Python book

2009-04-11 Thread bhaaluu
-- Forwarded message -- From: Tom Green Date: Sat, Apr 11, 2009 at 9:38 AM Subject: Re: [Tutor] Yet another Python book To: bhaaluu Book looks great.  Any help to master Python is appreciated. Great work. Mike. On Sat, Apr 11, 2009 at 9:04 AM, bhaaluu wrote: > > Than

Re: [Tutor] Yet another Python book

2009-04-11 Thread bhaaluu
Thanks for making this book available, Dave! This stuff looks very useful. On Fri, Apr 10, 2009 at 8:25 PM, Dave Kuhlman wrote: > I've collected my training materials plus a few more advanced > topics and I've also written up a reasonably large set of Python > exercises.  Then, I turned all of t

Re: [Tutor] text editor and debugger for python

2009-03-24 Thread bhaaluu
bruary 2006 " " Turn on syntax highlighting and autoindenting syntax enable filetype indent on " set autoindent width to 4 spaces (see " http://www.vim.org/tips/tip.php?tip_id=83) set et set sw=4 set smarttab " set line number (added by bhaaluu) set nu " Bind key to runni

Re: [Tutor] help on making python tictactoe

2009-01-19 Thread bhaaluu
On Mon, Jan 19, 2009 at 4:18 AM, jammy007 pp wrote: > guys , i need immediate help on creating a simple tictactoe game . > > i read micheal dawson's book but didnt quiet get it . > > please help . > > thanks . > > jammy Python Programming for the Absolute Beginner 2E by Michael Dawson has the BES

Re: [Tutor] Coin Flip

2008-10-03 Thread bhaaluu
First off, check your program's indentation. On Fri, Oct 3, 2008 at 2:04 PM, realNewbie <[EMAIL PROTECTED]> wrote: > > This is a class assignment, I am to create a program that flips a coin 100 > times and tells me the number of heads and tails. > I've been working on it for 2 days now and I am st

Re: [Tutor] (no subject)

2008-10-01 Thread bhaaluu
Correction of post typo follows. On Wed, Oct 1, 2008 at 8:57 AM, bhaaluu <[EMAIL PROTECTED]> wrote: > > #Now, let's flip the coin (PROCESS). > > while count != 0: >#each time through the loop, flip will randomly choose a side of the coin >flip = rand

Re: [Tutor] (no subject)

2008-10-01 Thread bhaaluu
Since an answer has already been given (by Pierre Dagenais), let's see if we can help you "figure it out". The first step is to read the program specification, or, in your case, read the homework problem very carefully. Since most computer programs have INPUT, PROCESS, and OUTPUT, let's try to loo

Re: [Tutor] absolute beginner

2008-09-10 Thread bhaaluu
On Wed, Sep 10, 2008 at 11:29 PM, Johnny <[EMAIL PROTECTED]> wrote: > Anyone have any advice for an all out beginner? > Advice as in... The best book?...best tutor web page? > I am wanting so badly to learn Python. > > I have went to this site... > http://www.awaretek.com/tutorials.html > > This ga

Re: [Tutor] hi...

2008-08-24 Thread bhaaluu
On Sun, Aug 24, 2008 at 2:31 AM, Alberto Perez <[EMAIL PROTECTED]> wrote: > I have a problem with python, I'm begginner in python. How clear the screen > of GUI python interactive I'm not sure what you mean by GUI interactive? However, at the Python interactive prompt, I can "clear the screen"

Re: [Tutor] Online class/education for Python?

2008-07-28 Thread bhaaluu
On Sun, Jul 27, 2008 at 12:13 PM, Dick Moores <[EMAIL PROTECTED]> wrote: > At 07:18 AM 7/27/2008, bhaaluu wrote: > >> So if >> a student goes through PPftAB2E, and wants to continue programming games, >> I'd recommend "Game Programming" by Andy Ha

Re: [Tutor] newbie graphing question

2008-07-27 Thread bhaaluu
On Sun, Jul 27, 2008 at 8:40 AM, Peter Petto <[EMAIL PROTECTED]> wrote: > I'm about to try some Python programming for drawing simple geometric > pictures (for math classes I teach) and was hoping to get some advice that > will send me off in the best direction. > > I want to write programs that ca

Re: [Tutor] Online class/education for Python?

2008-07-27 Thread bhaaluu
On Sun, Jul 27, 2008 at 3:33 AM, wesley chun <[EMAIL PROTECTED]> wrote: > > on a tangential note, i may be asked to teach a private course to > individuals who have never formally learned to program before, and i'm > participating in this thread for a number of reasons, including the > fact that i'

Re: [Tutor] Tutor Newbie

2008-07-25 Thread bhaaluu
On Thu, Jul 24, 2008 at 10:41 PM, Sam Last Name <[EMAIL PROTECTED]> wrote: > Hey guys, need some info on "programs" :) > > Heres a Very simple Script that works with basically any numbers. > > width = input("What is the Width?") > length = input("What is the Length?") > area = width*length > print

Re: [Tutor] Online class/education for Python?

2008-07-20 Thread bhaaluu
Hiyas Steve, If you're disciplined enough to shell out $$$ for an online class and do the work, why not just do it on your own? The tuition for a class will buy you several very nice Python books: Learning Python. Lutz. Programming Python. Lutz Core Python. Wesley Chun. Python Programming for the

Re: [Tutor] Guidance on jump-starting to learn Python

2008-07-20 Thread bhaaluu
On Fri, Jul 18, 2008 at 1:29 AM, Steve Poe <[EMAIL PROTECTED]> wrote: > > Any recommended "homework" assignments? > > I have two books as well: > Core Python Programming from Wesley Chun , Second Edition. > Python Programming for the Absolute Beginner, Second Edition. > > Thanks so much for your ad

Re: [Tutor] New to pythong

2008-07-07 Thread bhaaluu
On Mon, Jul 7, 2008 at 12:40 PM, Jeremiah Stack <[EMAIL PROTECTED]> wrote: > > > Hello everybody: > > I am new to this mailing list, and it said that i could the simplest of > questions. So i was wondering if anyone could be so kind as to e-mail me a > project idea or something to go out an learn t

Re: [Tutor] Exploring the Standard Library

2008-07-06 Thread bhaaluu
On Sat, Jul 5, 2008 at 2:23 PM, Nathan Farrar <[EMAIL PROTECTED]> wrote: > I'd like to spend some time exploring the standard library. I'm running > python on Ubuntu. How would I find the location of the modules (find / > -name "os.py" does not yield results)? > > Thanks! > Nathan > _

Re: [Tutor] tic tac toe

2008-07-04 Thread bhaaluu
On Fri, Jul 4, 2008 at 12:14 PM, Akanskha Kumar <[EMAIL PROTECTED]> wrote: > how can i make tic tac toe game using python programing. > There is an excellent tic-tac-toe tutorial in Michael Dawson's book, Python Programming for the Absolute Beginner Second Edition (ISBN-13: 978-1-59863-112-8).Chap

Re: [Tutor] addressbook program

2008-06-28 Thread bhaaluu
Hello Danny, Part of learning to program a computer is learning how to solve problems. I copy/pasted this code directly from the email, and tried to run it, as is. Error messages in Python are very informative. See below. On Sat, Jun 28, 2008 at 3:31 AM, Danny Laya <[EMAIL PROTECTED]> wrote: > Hi

Re: [Tutor] Invoking Python

2008-06-26 Thread bhaaluu
On Thu, Jun 26, 2008 at 9:53 AM, Cédric Lucantis <[EMAIL PROTECTED]> wrote: > Le Thursday 26 June 2008 15:37:01 kinuthiA muchanE, vous avez écrit : >> On Thu, 2008-06-26 at 12:00 +0200, [EMAIL PROTECTED] wrote: >> > Or more commonly add a first line like: >> > >> > #! /path/to/python/executable >>

Re: [Tutor] Invoking Python

2008-06-26 Thread bhaaluu
You can create a Python script on a *nix system and run it with: $ python threeplusfour.py You can place a shebang line as the first line of the script, which points to the python interpreter: #!/usr/bin/python print("Hello, world!\n") Save the file, then make it an executable with: $ chmod u+

Re: [Tutor] For Loop question

2008-06-26 Thread bhaaluu
On Thu, Jun 26, 2008 at 9:27 AM, Danny Laya <[EMAIL PROTECTED]> wrote: > Hi I'm learning FOR loop now, very easy too learn. But I get confused to > understand this code : > > myList = [1,2,3,4] > for index in range(len(myList)): > myList[index] += 1 > print myList > > And the response is: > [2,

Re: [Tutor] Hands-on beginner's project?

2008-06-25 Thread bhaaluu
Brian Wisti has a very nice tutorial for Python beginners that uses Interactive Fiction as the basis of a tutorial: http://coolnamehere.com/geekery/python/ifiction/index.html http://coolnamehere.com/geekery/python/ifiction/single-round.html http://coolnamehere.com/geekery/python/ifiction/multiple-

Re: [Tutor] Hands-on beginner's project?

2008-06-24 Thread bhaaluu
Take a look at this page, and see if it is what you're looking for: http://www.geocities.com/ek.bhaaluu/python/index.html I haven't worked on this project in awhile because I got sidetracked by other things, but it's still on the backburner. One day I'll pick it up again. I think Text Adventure G

Re: [Tutor] fibonacci.py task ???

2008-06-24 Thread bhaaluu
On Tue, Jun 24, 2008 at 8:47 AM, Danny Laya <[EMAIL PROTECTED]> wrote: > Hi all, can you explain me what this code mean : > Fibonacci.py > > # This program calculates the Fibonacci sequence > a = 0 > b = 1 > count = 0 > max_count = 20 > while count < max_count: > count = count + 1 > # we ne

Re: [Tutor] Another Newbie question

2008-06-24 Thread bhaaluu
On Tue, Jun 24, 2008 at 6:23 AM, Danny Laya <[EMAIL PROTECTED]> wrote: > Hi I got some problem about writting convention in python. Some tutorial ask > me to write this : > > a = 1 > s = 0 > print 'Enter Numbers to add to the sum.' > print 'Enter 0 to quit.' > while a != 0: > print 'Current Sum

Re: [Tutor] From Newbie

2008-06-22 Thread bhaaluu
On Sun, Jun 22, 2008 at 6:45 AM, Danny Laya <[EMAIL PROTECTED]> wrote: > Hi ! I have learned wiki tutor for non-programmer and I found some hill that > stopping me. In Non-Programmer's Tutorial for Python/Count to 10, wiki ask > me to write this code : > > a = 1 > s = 0 > print 'Enter Numbers to a

Re: [Tutor] Visualizing the Python Project

2008-06-17 Thread bhaaluu
On Tue, Jun 17, 2008 at 8:26 AM, W W <[EMAIL PROTECTED]> wrote: > On Tue, Jun 17, 2008 at 6:40 AM, bhaaluu <[EMAIL PROTECTED]> wrote: >> This is very interesting! >> >> http://www.vimeo.com/1093745 >> >> Visualizing the commit history of the

[Tutor] Visualizing the Python Project

2008-06-17 Thread bhaaluu
This is very interesting! http://www.vimeo.com/1093745 Visualizing the commit history of the Python scripting language project. http://vis.cs.ucdavis.edu/~ogawa/codeswarm/ Happy Programming! -- b h a a l u u at g m a i l dot c o m Kid on Bus: What are you gonna do today, Napoleon? Napoleon Dyn

Re: [Tutor] wanting to learn

2008-06-12 Thread bhaaluu
On Thu, Jun 12, 2008 at 3:12 AM, Ken Oliver <[EMAIL PROTECTED]> wrote: > >>http://www.briggs.net.nz/log/writing/snake-wrangling-for-kids/ > > This sounds interesting to me, but I have not been successful at downloading > the text at the link above. The dreaded 404. Does anyone have the Windows

Re: [Tutor] wanting to learn

2008-06-11 Thread bhaaluu
On Wed, Jun 11, 2008 at 10:48 AM, Michael yaV <[EMAIL PROTECTED]> wrote: > So, can anybody head me in the right direction with my endeavor? I've read 'Programming Python Third Edition' by Mark Lutz. O'Reilly & Assoc., 2006. ISBN 0596009259. It has a lot of stuff about doing things with the Net in

Re: [Tutor] wanting to learn

2008-06-11 Thread bhaaluu
ntax highlighting and autoindenting syntax enable filetype indent on " set autoindent width to 4 spaces (see " http://www.vim.org/tips/tip.php?tip_id=83) set et set sw=4 set smarttab " set line number (added by bhaaluu) set nu " Bind key to running the python interpreter on the

Re: [Tutor] destroying a window once a movie has stoped playing

2008-05-14 Thread bhaaluu
On Tue, May 13, 2008 at 9:07 PM, <[EMAIL PROTECTED]> wrote: > > > def movieu(self): > mov_name = "video.mpg" > pygame.mixer.quit() > screen = pygame.display.set_mode((320, 240)) > video = pygame.movie.Movie(mov_name) > screen = pygame.display.set_mode(v

Re: [Tutor] animations and movies

2008-05-09 Thread bhaaluu
On Thu, May 8, 2008 at 9:40 PM, [EMAIL PROTECTED]> wrote: > hey just wondering if any one can point me in the right direction for coding > animations and playing movies > > This message is intended for the addressee named and may contain privileged > information or

Re: [Tutor] animations and movies

2008-05-09 Thread bhaaluu
On Thu, May 8, 2008 at 9:40 PM, <[EMAIL PROTECTED]> wrote: > hey just wondering if any one can point me in the right direction for coding > animations and playing movies > > This message is intended for the addressee named and may contain privileged > information o

Re: [Tutor] animations and movies

2008-05-09 Thread bhaaluu
http://pygame.org/news.html On Thu, May 8, 2008 at 9:40 PM, <[EMAIL PROTECTED]> wrote: > hey just wondering if any one can point me in the right direction for coding > animations and playing movies > > This message is intended for the addressee named and may conta

Re: [Tutor] input and output files from terminal

2008-04-14 Thread bhaaluu
On Mon, Apr 14, 2008 at 12:55 PM, Brain Stormer <[EMAIL PROTECTED]> wrote: > I have a python program which works fine when run using idle but I would > like call the program from the terminal. > > python test.py -i inputfile -o outputfile > > I tried with raw_input but that only works in idle. Can

[Tutor] Python Programming Tools

2008-04-14 Thread bhaaluu
A (mainly Java) programmer on a LUG mailing list asks: What is a good IDE [for Python] that has Python tools for: library management, code completion, debugging, documentation, help Since I'm not familiar with Java at all, I'm not sure how many of the things he is asking for, are even relevant f

Re: [Tutor] designing POOP

2008-04-12 Thread bhaaluu
On Sat, Feb 9, 2008 at 9:46 AM, Alan Gauld <[EMAIL PROTECTED]> wrote: > > As I mentioned in an earlier mail it tends to oscillate in practice. > You start off looking at the problem to identify the basic classes. > Then you pick one or two and start designing those in detail and > that identifi

Re: [Tutor] Help Writing a Bill Calculating Program

2008-03-28 Thread bhaaluu
On Fri, Mar 28, 2008 at 12:50 AM, Amin Han <[EMAIL PROTECTED]> wrote: > Hi, I'm currently a novice at Python, and I need help creating the > following program... > > # Write a program that asks the user to enter a package number and the > total number of hours spent online that month (you may as

Re: [Tutor] Tutor support request.

2008-03-27 Thread bhaaluu
Hello Olrik, You can post your questions to this list and have access to many tutors. Generally speaking, if you'll post a code snippet with your question, it makes replying with a helpful answer much easier. Happy Programming! -- b h a a l u u at g m a i l dot c o m "You assist an evil system m

Re: [Tutor] how to write a function

2008-03-24 Thread bhaaluu
On Mon, Mar 24, 2008 at 8:07 AM, Bartruff, Pamela J. <[EMAIL PROTECTED]> wrote: > > Hello Python users, > > I am very new to Python, how do I program that converts 24 hour time to 12 > hour time? The program should have three functions(input, conversion and > output function) > > Thanks for any he

Re: [Tutor] Even More Converter!

2008-03-22 Thread bhaaluu
import re num = 12345678 print ','.join(re.findall("\d{3}", str(num))) output: 123,456 Where is the '78'? It looks like that solution inserts comma's from left to right instead of from right to left. -- b h a a l u u at g m a i l dot c o m "You assist an evil system most effectively by obeying

Re: [Tutor] self-learning Python

2008-03-09 Thread bhaaluu
On Sun, Mar 9, 2008 at 8:54 AM, Kent Johnson <[EMAIL PROTECTED]> wrote: > > On Sun, Mar 9, 2008 at 8:16 AM, Julia <[EMAIL PROTECTED] wrote: > > To be honest I truly dislike the Dawson book. I wouldn't recommend > > it to anyone. It's lacks technical clarity, examples and has a messy > >

Re: [Tutor] new on the list

2008-02-28 Thread bhaaluu
>8--- " .vimrc " " Created by Jeff Elkner 23 January 2006 " Last modified 2 February 2006 " " Turn on syntax highlighting and autoindenting syntax enable filetype indent on " set autoindent width to 4 spaces (see " http://www.vim.org/tips/ti

Re: [Tutor] results not quite 100 percent yet

2008-02-21 Thread bhaaluu
On Thu, Feb 21, 2008 at 8:49 AM, Tyler Smith <[EMAIL PROTECTED]> wrote: > > Not shorter, but definitely clearer would be to replace your magic > numbers with variables: > > entrance = 6 > exit = 11 > death_room = 13 > > Replacing each occurrence of those numbers in your code with the > varia

Re: [Tutor] results not quite 100 percent yet

2008-02-21 Thread bhaaluu
On Thu, Feb 21, 2008 at 7:32 AM, Kent Johnson <[EMAIL PROTECTED]> wrote: > > > Other beginning programers shouldn't have any problems using > > these routines. > > As long as they use the same number of rooms and entrance and exit > rooms, or they know the places to make the magic edits... > >

Re: [Tutor] designing POOP

2008-02-21 Thread bhaaluu
On Wed, Feb 20, 2008 at 7:53 PM, Alan Gauld <[EMAIL PROTECTED]> wrote: > "Michael Langford" <[EMAIL PROTECTED]> wrote > > > I'm firmly with Kent here: OO programming is not about simulation. > > Wooah! > I'm partly on board here and do agree the noun/verb thing is > a gross simplification. But

Re: [Tutor] results not quite 100 percent yet

2008-02-21 Thread bhaaluu
On Wed, Feb 20, 2008 at 6:39 PM, Tiger12506 <[EMAIL PROTECTED]> wrote: > > I'll throw a couple of thoughts out there since I know that you appreciate > to see many points of view. > > > > #!/usr/bin/python > > Hard-coded. That means you have to change the program to change the game. It > would

Re: [Tutor] results not quite 100 percent yet

2008-02-20 Thread bhaaluu
As far as I can see, these routines give me the results I'm looking for. I get a distribution of four negative numbers, four positive integers in the range 10 to 110, and nothing is placed in room 6 or room 11: #!/usr/bin/python import random #print "\n"*30 table= [[ 0, 2, 0, 0, 0, 0, 0],#

Re: [Tutor] designing POOP

2008-02-12 Thread bhaaluu
On Feb 12, 2008 7:19 AM, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > > Did we think about REUSABILITY? What if in some other application I want > to USE the score, not just display it? What if I want to display it in a > different form (multiplying it by 100)? Then you are back to our > original opt

Re: [Tutor] designing POOP

2008-02-11 Thread bhaaluu
On Feb 11, 2008 3:49 AM, Alan Gauld <[EMAIL PROTECTED]> wrote: > > I think we are in general agreement, albeit with different levels of > trust/toleration of the technique. Direct access is preferred to > getter/setter methods but is in turn less desirable that higher > level methods where they exi

Re: [Tutor] designing POOP

2008-02-09 Thread bhaaluu
On Feb 9, 2008 8:46 AM, Alan Gauld <[EMAIL PROTECTED]> wrote: > "bhaaluu" <[EMAIL PROTECTED]> wrote > Some more thoughts on designing here. You said I can use the procedural program as a program "requirement" because it defines I/O. Even though the OOP progr

Re: [Tutor] designing POOP

2008-02-09 Thread bhaaluu
On Feb 9, 2008 4:09 AM, Alan Gauld <[EMAIL PROTECTED]> wrote: > > "Tiger12506" <[EMAIL PROTECTED]> wrote > > > Are some simple examples off the top of my head. It's not difficult > > to model > > real-life things with classes, but ... > > This is a good point, it is excellent practice for thinking

Re: [Tutor] designing POOP

2008-02-08 Thread bhaaluu
On Feb 8, 2008 4:46 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > bhaaluu wrote: > > > It also cleaned up main(), and put everything in well defined packages > > at the top of the program. > > Yes, good OOD puts things into cohesive, comprehensible packages. > >

Re: [Tutor] designing POOP

2008-02-08 Thread bhaaluu
On Feb 8, 2008 3:24 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > > and change the loop from >while True: > to >while explr.alive: > > This would give you an Explorer class that actually does something useful. > > Kent > It also cleaned up main(), and put everything in well defined pa

Re: [Tutor] designing POOP

2008-02-08 Thread bhaaluu
On Feb 7, 2008 9:40 PM, Tiger12506 <[EMAIL PROTECTED]> wrote: > There's a couple of errors in here that no one has addressed yet because the > question was geared towards programming style... So now I will address them. > Or undress them, I suppose. ;-) I didn't make much progress until I started

Re: [Tutor] designing POOP

2008-02-07 Thread bhaaluu
On Feb 7, 2008 6:47 PM, Alan Gauld <[EMAIL PROTECTED]> wrote: > > "Alan Gauld" <[EMAIL PROTECTED]> wrote > > >> What is the equivalent of JUnit in Python? > > > > I think the nearest equivalent is > > > > Oops, I was going top say PyUnit then remembered the name > had changed but forgot to check ou

Re: [Tutor] designing POOP

2008-02-07 Thread bhaaluu
On Feb 7, 2008 4:58 PM, Eric Brunson <[EMAIL PROTECTED]> wrote: > bhaaluu wrote: > > What is the equivalent of JUnit in Python? The article says that JUnit is > > used for unit tests, or you can write your own. Since I don't have a clue, > > writing my own is pro

Re: [Tutor] designing POOP

2008-02-07 Thread bhaaluu
On Feb 7, 2008 4:07 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > bhaaluu wrote: > > > The TDD method is the method used in my tutorial: > > Python Programming for the Absolute Beginner 2E. Michael Dawson. 2006. > > Dawson uses a very simple Tamagotchi example c

Re: [Tutor] designing POOP

2008-02-07 Thread bhaaluu
I was asked: Here's a situation I often encounter, and I was wondering what the "best practice" is. I've generally initialized my classes' attributes this same way: > class TestClass1(object): > """ please give me a better name""" > def __init__(self): > """please document me""

Re: [Tutor] A bit about python culture

2008-02-07 Thread bhaaluu
On Feb 7, 2008 5:44 AM, Michael Bernhard Arp Sørensen <[EMAIL PROTECTED]> wrote: > Greetings Masters. > > I was wondering if there's a well know word for python programmers, that is > usable as a domain name. Unfortunately, "pug.dk", as in "python user group, > Denmark", is unavailable here in Denm

Re: [Tutor] designing POOP

2008-02-07 Thread bhaaluu
Greetings, I've read both Kent's and Alan's approaches to designing a POOP, and am intrigued with the possibilities of the noun/verb/adjective technique, but am also sympathetic to the TDD method as well because it is how I've always programmed. I have noted Alan's comments on the limitations of T

Re: [Tutor] designing POOP

2008-02-07 Thread bhaaluu
On Feb 6, 2008 8:15 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > > Design a little, code a little, repeat... > http://personalpages.tds.net/~kent37/stories/3.html > > > You can discover many useful design techniques by applying DRY. More here: > http://personalpages.tds.net/~kent37/s

Re: [Tutor] designing POOP

2008-02-06 Thread bhaaluu
On Feb 6, 2008 12:06 PM, Alan Gauld <[EMAIL PROTECTED]> wrote: > "bhaaluu" <[EMAIL PROTECTED]> wrote > > > Here is my description, in plain English. > > > > Text Adventure Game Requirements: > > 1. The Explorer enters her name at a prompt. >

Re: [Tutor] designing POOP

2008-02-06 Thread bhaaluu
, 2008 12:06 PM, Alan Gauld <[EMAIL PROTECTED]> wrote: > "bhaaluu" <[EMAIL PROTECTED]> wrote > > > Here is my description, in plain English. > > > > Text Adventure Game Requirements: > > 1. The Explorer enters her name at a prompt. > > 2.

Re: [Tutor] designing POOP

2008-02-06 Thread bhaaluu
On Feb 5, 2008 3:02 PM, Alan Gauld <[EMAIL PROTECTED]> wrote: > > Describe the problem in plain English text(or whatever you > language is!). > -- > Alan Gauld > Author of the Learn to Program web site > http://www.freenetpages.co.uk/hp/alan.gauld > Here is my description, in plain English. Text

Re: [Tutor] designing POOP

2008-02-06 Thread bhaaluu
On Feb 5, 2008 3:02 PM, Alan Gauld <[EMAIL PROTECTED]> wrote: > > One of the earliest ways of doing this has now fallen sonewhat > out of favour but in practie I find it works quite well for beginners > is: > > Describe the problem in plain English text(or whatever you > language is!). Underline th

Re: [Tutor] designing POOP

2008-02-05 Thread bhaaluu
On Feb 5, 2008 1:13 PM, Marc Tompkins <[EMAIL PROTECTED]> wrote: > > On Feb 5, 2008 5:46 AM, bhaaluu <[EMAIL PROTECTED]> wrote: > > What I'm interested in is the thought processes and/or > > guidelines that Tutors employ when they sit down to design a POOP. >

[Tutor] designing POOP

2008-02-05 Thread bhaaluu
Greetings, POOP: Python Object Oriented Programming/Programmer/Program(s) I have finished the procedural Python version of the Text Adventure Game. See attached uuencoded zip file which contains tag10.py, data.py and actions.py. [uudecode tag.uue; unzip tag.zip; python tag10.zip] Now I am in

Re: [Tutor] good reference book recommendations

2008-02-04 Thread bhaaluu
Being a book snob, I'd go for the O'Reilly Nutshell book over the SAMS Essential Reference. I've always had good luck with books published by O'Reilly. I have neither of the books you asked about, because I use online docs. I don't need no steenkin' dead tree Python reference. 8^P Actually, I've he

Re: [Tutor] Livewires

2008-02-02 Thread bhaaluu
On Feb 1, 2008 11:41 PM, Seon Kang <[EMAIL PROTECTED]> wrote: > Python will not recognize the keyboard class of livewires. what is my > problem? (i have imported the modules and everything) > ___ > Tutor maillist - Tutor@python.org > http://mail.python.

Re: [Tutor] [Fwd: PyWeek 6 is coming!]

2008-02-02 Thread bhaaluu
Would you consider a python-Tutor team member who: 1. Is new to Python? 2. Never worked with a programming team before? 3. Doesn't have much gaming experience? 4. Doesn't have a recent version of MS-Windows (has Mac OS X or GNU/Linux)? 5. May not be running the latest and greatest version of Pytho

Re: [Tutor] results not quite 100 percent yet

2008-01-31 Thread bhaaluu
On Jan 31, 2008 3:19 AM, Alan Gauld <[EMAIL PROTECTED]> wrote: > "bhaaluu" <[EMAIL PROTECTED]> wrote > > > how to program a TAG in Python. My goal is to code > > the game in POOP > > POOP Python Object Oriented Programming 8^D > > > I fi

Re: [Tutor] results not quite 100 percent yet

2008-01-30 Thread bhaaluu
On Jan 30, 2008 11:25 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > bhaaluu wrote: > > References: > > http://www.csd.uwo.ca/Infocom/ > > http://www.atariarchives.org/adventure/ > > http://en.wikipedia.org/wiki/Tim_Hartnell > > http://www.renpy.org/wiki/r

Re: [Tutor] results not quite 100 percent yet

2008-01-30 Thread bhaaluu
On Jan 30, 2008 10:13 PM, Tiger12506 <[EMAIL PROTECTED]> wrote: > If you're looking for examples - I like the zork games... > > http://www.csd.uwo.ca/Infocom/download.html > I've already looked at the Infocom site and didn't find anything that helped me understand Text Adventure Games like Hartne

Re: [Tutor] results not quite 100 percent yet

2008-01-30 Thread bhaaluu
### On Jan 30, 2008 2:24 PM, bob gailer <[EMAIL PROTECTED]> wrote: > bhaaluu wrote: > > # N S E W U D T > > travelTable=[[0,2,0,0,0,0,0],# ROOM 1 > > [1,3,3,0,0,0,0],# ROOM 2 > It is good to finally see that you are building an adv

Re: [Tutor] results not quite 100 percent yet

2008-01-30 Thread bhaaluu
On Jan 30, 2008 2:24 PM, bob gailer <[EMAIL PROTECTED]> wrote: > bhaaluu wrote: > > # N S E W U D T > > travelTable=[[0,2,0,0,0,0,0],# ROOM 1 > > [1,3,3,0,0,0,0],# ROOM 2 > It is good to finally see that you are building an adventure

Re: [Tutor] results not quite 100 percent yet

2008-01-30 Thread bhaaluu
On Jan 30, 2008 12:46 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > bhaaluu wrote: > > > # distribute positive numbers 10 to 109 > > # place in last element of 4 random lists > > # nothing is placed in list 6 or 11 > > cnt=0 > > while cnt <= 3: > &g

Re: [Tutor] results not quite 100 percent yet

2008-01-30 Thread bhaaluu
On Jan 30, 2008 3:35 AM, Alan Gauld <[EMAIL PROTECTED]> wrote: > In addition to Kents comments about dictionaruy > access I think there may be another problem in > your logic. > > > "bhaaluu" <[EMAIL PROTECTED]> wrote > > > The first loop is su

Re: [Tutor] results not quite 100 percent yet

2008-01-30 Thread bhaaluu
On Jan 30, 2008 9:22 AM, Kent Johnson <[EMAIL PROTECTED]> wrote: > This is implementation dependent. >[snip] > > > if travelTable.values()[roomNum-1][0] != 0: > > Again, the use of travelTable.values() is pointless, inefficient (it > creates a new list every time you call it) and indetermin

Re: [Tutor] results not quite 100 percent yet

2008-01-30 Thread bhaaluu
On Jan 30, 2008 8:24 AM, Kent Johnson <[EMAIL PROTECTED]> wrote: > bhaaluu wrote: > > Now that you mention it, I do seem to remember that the order of > > a list is indeterminate. > > No; the order of a dict is indeterminate, and consequently the order of > list

Re: [Tutor] results not quite 100 percent yet

2008-01-30 Thread bhaaluu
On Jan 29, 2008 9:26 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > bhaaluu wrote: > > if keY == 6 or keY == 11 or tablE.values()[keY-1][6] != 0: > > tablE.values()[5][6] = 0 > > tablE.values()[10][6] = 0 > > This is not the right way to access t

Re: [Tutor] results not quite 100 percent yet

2008-01-30 Thread bhaaluu
On Jan 29, 2008 9:26 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > Try > if keY == 6 or keY == 11 or tablE[keY-1][6] != 0: > tablE[5][6] = 0 > tablE[10][6] = 0 > > etc. > > Kent > > PS what's with the strange capitalization of variable names? It's a test snippet. I use unusu

[Tutor] results not quite 100 percent yet

2008-01-29 Thread bhaaluu
Greetings, I'm having a problem with the following test. I make a dictionary with 19 keys (1 to 19). Each key has a list of 7 numbers (A to G) # Set up the table #key# A B C D E F G tablE= {1:[ 0, 2, 0, 0, 0, 0, 0],# 1 2:[ 1, 3, 3, 0, 0, 0, 0],# 2 3:[ 2, 0, 5,

Re: [Tutor] Teach-yourself game design site... for Python?

2008-01-18 Thread bhaaluu
Greetings, There are several beginning tutorials at the PyGame site: http://pygame.org/news.html -- b h a a l u u at g m a i l dot c o m http://www.geocities.com/ek.bhaaluu/python/index.html On Jan 18, 2008 3:23 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > James Newton wrote: > > Hi folks, > > >

Re: [Tutor] Program Specification Request

2008-01-16 Thread bhaaluu
Greetings, Take a look at this page: http://davidbau.com/python/learning.html and also this one (by the same programmer): http://davidbau.com/archives/2005/07/29/haaarg_world.html Not only are these interesting reads, but also give a glimpse into what it takes to teach kids computer programmin

Re: [Tutor] Read protection of python files for Abaqus

2008-01-14 Thread bhaaluu
Greetings, On Jan 14, 2008 3:17 AM, Ferruh KAYHAN <[EMAIL PROTECTED]> wrote: > Dear Sirs; > Good morning. > I do not like abaqus users will read my python file codes. How can I > protect my codes from reading ans still workable by Abaqus import?? > > Best Regards > Ferruh Kayhan Abaqus is widely

Re: [Tutor] Review and criticism of python project

2008-01-03 Thread bhaaluu
If you have a web page, you can upload the code to your web page, then post here with a link to the code and a request for reviews. That's one way to do it. -- b h a a l u u at g m a i l dot c o m On Jan 3, 2008 5:00 PM, GTXY20 <[EMAIL PROTECTED]> wrote: > > Hello all, > > Is there a forum or gro

Re: [Tutor] constants, flags or whatever

2007-12-19 Thread bhaaluu
This isn't elegant, but it is a start. My method is: get SOMETHING working, then work from there. 8^D """ constant: moving = "m" constant: inserting = "i" constant: jumping = "j" . . action = moving . . . if action == jumping: jumpSomewhere() elseif action == moving: moveSomewhere() elseif

Re: [Tutor] How is "tuple" pronounced?

2007-12-11 Thread bhaaluu
Greetz! On Dec 11, 2007 4:55 PM, earlylight publishing <[EMAIL PROTECTED]> wrote: > So it looks like most folks here and on the web are saying too-ple (rhymes > with scruple or pupil... sorta). That's the one I'll go with... now that I > can say it it's time to get back to learning how to use em!

Re: [Tutor] Timed While Loops and Threads

2007-12-09 Thread bhaaluu
On Dec 8, 2007 11:11 PM, Michael H. Goldwasser <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > I'm having some fun combining two recent topics: the "Timed While > Loops" game and that of communication between threads. Here is an > example that allows a person to gather points in a while loop, but

Re: [Tutor] Still Can't Find Timed While Loops

2007-12-07 Thread bhaaluu
On Dec 7, 2007 2:36 PM, Scottie Hotchkiss <[EMAIL PROTECTED]> wrote: > Disclaimer: I can't test this while I'm at work, but using > > "while 1:" > > instead of > > "while time.time() - start < 30.0" > > would be better. > > In the former case if you press enter after time has run out, it won't > pr

Re: [Tutor] Still Can't Find Timed While Loops

2007-12-07 Thread bhaaluu
On Dec 7, 2007 10:41 AM, bob gailer <[EMAIL PROTECTED]> wrote: > earlylight publishing wrote: > > Hello all, > > > > I now have my bit of code in while loop form and it works! It's great > > but not exactly what I wanted to do. I've been googling my heart out > > and I find lots of info on while

  1   2   >