From stuart at gathman.org Wed Feb 1 19:26:56 2006 From: stuart at gathman.org (Stuart D. Gathman) Date: Wed, 1 Feb 2006 19:26:56 -0500 (EST) Subject: [Verba] Re: wait! In-Reply-To: <000901c6278d$90a67d60$6401a8c0@CPQ2003> Message-ID: On Wed, 1 Feb 2006, Rebecca Chenette wrote: > Wait I have a guess about the reason python doesnt seem to do fractions: Is > it because python rounds everything? like I put in 2001/2 and got 1000. So > does python just round? When dividing integers, python does integer division. You get just the whole number part of the result. For the remainder, use the % operator. You can get both quotient and remainder with divmod(). For example, >>> 2001%2 1 >>> divmod(2001,2) (1000, 1) >>> divmod(2,8) (0, 2) If one of the numbers is floating point, python will do floating point division. E.g. >>> 2.0/8 0.25 -- Stuart D. Gathman Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flamis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial. From stuart at gathman.org Wed Feb 1 19:24:07 2006 From: stuart at gathman.org (Stuart D. Gathman) Date: Wed, 1 Feb 2006 19:24:07 -0500 (EST) Subject: [Verba] Re: another question: In-Reply-To: <000a01c6278d$90cca300$6401a8c0@CPQ2003> Message-ID: On Wed, 1 Feb 2006, Rebecca Chenette wrote: > I have made a folder under the desktop. I'm simply practicing putting path > names into the command prompt and making it work(this is a good thing, > right?) yep > anywyay, having made a folder,( I put bin2 in there to practice) I > tried the path name. Just from looking at it, can you see where I messed up > that it won't give me the file? > CD \Documents and Settings\Owner\desktop\snake foler\bin2 When the path contains spaces, you must use quotes. E.g. CD "\Documents and Settings\Owner\desktop\snake foler\bin2" I recommend avoiding spaces in file and directory names. -- Stuart D. Gathman Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flamis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial. From stuart at gathman.org Fri Feb 10 11:45:27 2006 From: stuart at gathman.org (Stuart D. Gathman) Date: Fri, 10 Feb 2006 11:45:27 -0500 (EST) Subject: [Verba] Meeting summary Message-ID: We reviewed Taylors program to decode binary ASCII messages, and reviewed coding. Rebecca manned the keyboard for creating a DNA antisense function. The program is attached. -- Stuart D. Gathman Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flamis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial. -------------- next part -------------- def complement(n): """Return complementary nucleotide >>> complement("T") 'A' >>> complement("C") 'G' """ if n == 'T': return 'A' if n == 'A': return 'T' if n == 'G': return 'C' if n == 'C': return 'G' raise ValueError('invalid nucleotide: ' + n) def antisense(s): """Find antisense nucleotide sequence >>> antisense("GATTCAGTTAG") 'CTAAGTCAATC' """ return ''.join(complement(c) for c in s) def _test(): import doctest,comp return doctest.testmod(comp) # Make into a program that can complement DNA sequences if __name__ == '__main__': _test() import sys print "Enter sequence to be complemented:" print antisense(raw_input()) From stuart at gathman.org Sun Feb 19 19:02:09 2006 From: stuart at gathman.org (Stuart D. Gathman) Date: Sun, 19 Feb 2006 19:02:09 -0500 (EST) Subject: [Verba] Meeting summary Message-ID: We used line and circle commands to draw pictures, and started on a "robots" game. On Saturday, I went to the Chenettes to get all the Python stuff installed for Rebecca, went through some of a tutorial with Rebecca, and showed Open Office to Mr. Chenette. I am available to help Jillian as well - just tell me when. I think Jillian might be interested in a python program to solve the Rubik's cube. The first step to understanding the problem is to count the number of combinations. Note that it is *not* the total permutations of the colored squares (i.e. you can make a Rubik's cube impossible to solve by swapping colored squares .. a great joke to play on someone ..). Here is a similar situation for a simpler puzzle: http://www.holotronix.com/samlloyd15b.html -- Stuart D. Gathman Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flamis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial. From stuart at gathman.org Tue Feb 21 00:12:52 2006 From: stuart at gathman.org (Stuart D. Gathman) Date: Tue, 21 Feb 2006 00:12:52 -0500 (EST) Subject: [Verba] Meeting summary In-Reply-To: Message-ID: On Sun, 19 Feb 2006, Stuart D. Gathman wrote: > I think Jillian might be interested in a python program to solve the > Rubik's cube. The first step to understanding the problem is to count the > number of combinations. Note that it is *not* the total permutations of > the colored squares (i.e. you can make a Rubik's cube impossible to solve > by swapping colored squares .. a great joke to play on someone ..). > > Here is a similar situation for a simpler puzzle: > > http://www.holotronix.com/samlloyd15b.html I ordered a book called "Adventures in Group Theory" which is illustrated lots of permutation puzzles including Rubik's cube. Meanwhile, for online education, the following resource is excellent: Introduction to Group Theory: http://members.tripod.com/~dogschool/ After working through those lessons, you'll understand the denser summary in Wikipedia: http://en.wikipedia.org/wiki/Rubik's_Cube_as_a_mathematical_group Not only that, you'll understand jokes like: Q. "What's purple and commutes?" A. "An abelian grape." http://en.wikipedia.org/wiki/Abelian_group While this tangent makes the computer club wonderfully geeky, you will need to grasp the math before being able to design an efficient program to solve the cube. So learning group theory will have to take place on the side for those interested. Jillian - trust me. Your cube interest will further your education if you pursue the deep understanding of such puzzles afforded by group theory. Otherwise, you are wasting your time. We'll continue to learn programming basics in the foreground. (Unless, of course, both class members are consumed with curiousity on this topic.) -- Stuart D. Gathman Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flamis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial. From stuart at gathman.org Fri Feb 24 20:03:37 2006 From: stuart at gathman.org (Stuart D. Gathman) Date: Fri, 24 Feb 2006 20:03:37 -0500 (EST) Subject: [Verba] Meeting Summary Message-ID: Rebecca was sick, so Jillian and I delved into group theory. This seems to be a banned subject on the BeSafe filter, so I have mirrored the content onto my domain. (I think BeSafe bans all public web space sites like tripod, myspace, xanga, etc.) http://gathman.org/grouptheory -- Stuart D. Gathman Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flamis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial. From stuart at gathman.org Fri Feb 24 20:25:41 2006 From: stuart at gathman.org (Stuart D. Gathman) Date: Fri, 24 Feb 2006 20:25:41 -0500 (EST) Subject: [Verba] Planned outage Message-ID: The web server hosting gathman.org will be moved sometime Saturday or Sunday. The archives are resources will not be available during the move. Service should be restored by Monday. (There is some question however, because Cox installed our circuit in the wrong building! They scheduled an emergency install to make up for it, but who knows.) -- Stuart D. Gathman Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flamis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial. From monkeybec at cox.net Sat Feb 25 20:01:46 2006 From: monkeybec at cox.net (Rebecca Chenette) Date: Sat, 25 Feb 2006 20:01:46 -0500 Subject: [Verba] Planned outage References: Message-ID: <006c01c63a70$37837cb0$6401a8c0@CPQ2003> Gotit about the unavailableness. I read the first thing about the group theory! I'm getting that it has alot to do with abstract equations and has 4 main part/laws/rules that help you change an equation around. I get ( I think) how the changed a(dot)x=b to x=a(to the neg one)(dot) b. It's explaining thing processes we take for granted(like just dividing 'it' by both sides)....am I on the right track? ----- Original Message ----- From: "Stuart D. Gathman" To: Sent: Friday, February 24, 2006 8:25 PM Subject: [Verba] Planned outage > The web server hosting gathman.org will be moved sometime Saturday or > Sunday. The archives are resources will not be available during the move. > Service should be restored by Monday. > > (There is some question however, because Cox installed our circuit in the > wrong building! They scheduled an emergency install to make up for it, > but who knows.) > > -- > Stuart D. Gathman > Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 > "Confutatis maledictis, flamis acribus addictis" - background song for > a Microsoft sponsored "Where do you want to go from here?" commercial. > > _______________________________________________ > Verba mailing list > Verba at gathman.org > http://gathman.org/mailman/listinfo/verba > > > >