Re: [Tutor] need a hint

2013-12-04 Thread Byron Ruffin
( senator, usSenators ): print( usSenators[senator] ) def main(): usSenators = createList( "USSenators.txt" ) usSenators2 = createList2( "USSenators.txt" ) test( "Texas", usSenators ) test2("Udall", usSenators2 ) main() On Tue, Dec 3,

Re: [Tutor] need a hint

2013-12-03 Thread Byron Ruffin
. I know I need to loop through the list of names, which I have, and set a condition dor the apppearance of a string occurring more than once in a list but I don't know how to translate this to code. How do I say: if you see it twice, do something? On 2 December 2013 02:25, Byron Ruffin

[Tutor] need a hint

2013-12-02 Thread Byron Ruffin
The following program works and does what I want except for one last problem I need to handle. The program reads a txt file of senators and their associated states and when I input the last name it gives me their state. The problem is "Udall". There are two of them. The txt file is read by lin

[Tutor] ideas?

2013-11-18 Thread Byron Ruffin
Need a little help with finding a process for this: when a string of text is input, for example: abc def. I want to have each letter shift to the right one place in the alphabet. Thus.. abc def would be output as bcd efg. Any ideas on how to do this? __

[Tutor] loop running twice?

2013-11-17 Thread Byron Ruffin
def main(): goal, apr, deposit = getSavingsDetails() determineMonthsTilSaved( goal, apr, deposit ) months = determineMonthsTilSaved(goal, apr, deposit) summarize( months ) def getSavingsDetails(): """ goal = float( input( "Principal sought? $" ) ) apr = float( input(

[Tutor] basic function concept

2013-11-16 Thread Byron Ruffin
def main(x, y, z): print (x, y, z) def funct(): x = 1 y = 2 z = 3 return x, y, z main() Can someone tell me why main is not being given any arguments? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription

[Tutor] space between words printed

2013-11-03 Thread Byron Ruffin
The output generates a sentence made up of words chosen randomly from lists. I am having trouble getting a space between each of the words. Should I be thinking about .split? Here is the code (ignore indent errors as it was copied and pasted) Thank you: import random def wordList(): adj1 =

[Tutor] cs student needs help import math

2013-09-07 Thread Byron Ruffin
I am writing a simple program based off an ipo chart that I did correctly. I need to use ceil but I keep getting an error saying ceil is not defined. I did import math, I think. I am using 3.2.3 and I imported this way... >>> import math >>> math.pi 3.141592653589793 >>> math.ceil(math.pi) 4 >>>

Re: [Tutor] python books

2005-10-19 Thread Byron
is book, in my opinion.) Byron --- ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python books: buying advice needed

2005-10-19 Thread Byron
ing, found this book to be an excellent resource -- I would highly recommend it. Byron --- David Stotijn wrote: > Hi, > > I'm planning on buying a book to help me learn Python. Some of the books > I'm considering are a few years old and based on an older version of >

Re: [Tutor] Why won't it enter the quiz? (off topic)

2005-09-16 Thread Byron
Poor Yorick wrote: > Once again you're implying that there's something wrong with Nathan > asking for help on this list. Blow it out your hairdo... No, I did not imply or state that at all. In fact, I was answering your own statement in which you posted the following valid argument: > "I'd

Re: [Tutor] Why won't it enter the quiz?

2005-09-16 Thread Byron
Nathan Pinno wrote: > Brian and all, > > I am just asking for help - after all I write most each program myself, > and just ask for help in debugging it whenever I cannot figure it out. > If this is being sneaky, I apologize, and won't ask for help anymore. No, don't do that... Happy that you

Re: [Tutor] Why won't it enter the quiz? (off topic)

2005-09-16 Thread Byron
nly), there is a HUGE difference between selling "skills" and selling code that someone else wrote. :-D Brian --- Nathan Coulter wrote: > Byron wrote: > >>Hi Nathan, >> >>Wow, I have to give you some good credit -- you are quite the sneaky and >>innova

Re: [Tutor] Why won't it enter the quiz?

2005-09-16 Thread Byron
Hi Nathan, Wow, I have to give you some good credit -- you are quite the sneaky and innovative business guy. You get the free tutors here to help write your programs and when they are finished, you sell them on your website for $20.00 each! I bet more businesses wish they could do business t

Re: [Tutor] Is there an easy way to combine dictionaries?

2005-09-06 Thread Byron
Lane, Frank L wrote: > Is there an easy way to combine dictionaries? Hi Frank, Yes, there is -- please see the "addDict" method that I have provided below: Byron --- def addDicts(a, b): c = {} for item in a: c[item] = a[item]

Re: [Tutor] Game Engine HowTos?

2005-09-05 Thread Byron
rite" the engine itself. If you check their site, which seems to be well documented, I am sure that you can find out. Byron --- ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Program to lock folders under win32

2005-09-04 Thread Byron
;repair" or maintenance tools on your system, such as defrag or diskscan, you can lose your data. Magic Folders creates a file system on the hard drive that "looks" like lost clusters. Because of this, Windows jumps in and tries to "fix" it for you. Not good! ;-) B

Re: [Tutor] Program to lock folders under win32

2005-09-03 Thread Byron
provide uploading rights, then you can always setup FTP abilities, etc. Byron --- ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Game Engine HowTos?

2005-09-03 Thread Byron
Joseph Quigley wrote: > Or does anyone know of a good Game Engine writing tutorial in another > language? I believe this is what you are looking for: http://www.pygame.org/ Byron --- ___ Tutor maillist - Tutor@python.org http://mail.pyth

Re: [Tutor] Importing a List from Module

2005-08-27 Thread Byron
92] return newList aList = returnList() print aList Note the return statement... This enables assignment, as you have done in "xy=enterData.returnList()" Hope this helps, Byron --- ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Generate 8 digit random number

2005-08-26 Thread Byron
] count += 1 print strNumber # A quick test... count = 0 while (count < 1): generateKey() count += 1 --- Byron :-) --- Alberto Troiano wrote: > Hi everyone > > I need to generate a password..It has to be an 8

Re: [Tutor] Working with files

2005-08-24 Thread Byron
tutorial: http://www.greenteapress.com They provide an excellent tutorial for learning the basics of Python -- and best of all, it's free and written for absolute beginners. Take care, Byron --- ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Remove a number from a string

2005-08-23 Thread Byron
what you're wanting to accomplish: Byron --- def removeNums(addr): text = addr.split() revisedAddr = "" for item in text: try: i = int(item) except: revisedAddr += item + " " return revisedAddr.strip() # Test the funct

Re: [Tutor] Counting help

2005-08-23 Thread Byron
Hi Scott, The site ( http://www.greenteapress.com ) has a wonderful tutorial on it for Python that quickly teaches one (within a few minutes) how to work with dictionaries. I would highly recommend that you check it out. It's well worth it...

Re: [Tutor] Counting help

2005-08-23 Thread Byron
irst thing I considered. > >l = ['a list of names'] > >d = {} > >for name in namelist: >if d.has_key(name): >x = d.get(name) >d[name] = x + 1 >else: >d[name] = 1 > 100% ag

Re: [Tutor] Writing to text files

2005-08-22 Thread Byron
Byron wrote: > Hi Danny, > > I agree 100% with your statement. The reason why I left it in its > "fragile" state was to help keep the example provided simple and > straight forward. Since this is a "beginners" group, I wanted to > confuse by adding

Re: [Tutor] Writing to text files

2005-08-22 Thread Byron
gt;>filedata = file.read() >>file.close() >> >>newLine = "Your new line of data with the time stamp goes here.\n" + >>filedata >>file = open("datafile.txt", "w") >>file.write(newLine) >>file.close() >> >> >

Re: [Tutor] Writing to text files

2005-08-22 Thread Byron
ew line of data with the time stamp goes here.\n" + filedata file = open("datafile.txt", "w") file.write(newLine) file.close() --- Hope this helps, Byron :-) --- Johan Geldenhuys wrote: > Hi all, > I want to write to a text file with a timestamp, but I want t

Re: [Tutor] Network Programming Information and terminology

2005-08-21 Thread Byron
x27;." # Receive the response back from the server. data, client = UDPSock.recvfrom(100) print data # Close socket UDPSock.close() --- Hope this helps, Byron --- John Walton wrote: >Hello. It

Re: [Tutor] HELP ME DUDE

2005-07-22 Thread byron
of that scope will probably not get you too much help. ;-) Byron --- This message was sent using IMP, the Internet Messaging Program. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Please Help: Hacking

2005-07-22 Thread byron
Quoting Jeremy Jones <[EMAIL PROTECTED]>: > Here you go. This should be enlightening: > > http://www.catb.org/~esr/writings/unix-koans/script-kiddie.html Hi Jeremy, That's great... Thanks for sharing the link. Byron --- -

Re: [Tutor] hello

2005-07-21 Thread byron
Yes, it is. :-) Byron --- Quoting dina lenning <[EMAIL PROTECTED]>: > is this where i send my questions?? This message was sent using IMP, the Internet Messaging Program.

Re: [Tutor] Getting singal strength of the received packet

2005-07-19 Thread Byron
s information from Python. Byron ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] OT python Licences

2005-07-12 Thread Byron
However, you can commercially write apps in Python and then sell them -- without having to make them open source or give-awayable to the general community. Hope this helps, Byron --- -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.8.12/

Re: [Tutor] What's going on with this code? Error message supplied.

2005-07-10 Thread Byron
you have gone though that tutorial, I would then recommend the following advanced materials: http://www.devshed.com/c/b/Python/ HTHs (Hope this helps), Byron --- -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.8.11/44 - Release

Re: [Tutor] Is it possible to...

2005-07-10 Thread Byron
e best option -- however, if Nathan is wanting to learn how to password protect a page using Python technology, I would recommend that he check out the following page: http://www.devshed.com/c/a/Python/Python-on-the-Web/ HTHs, Byron --- -- No virus found in this outgoing message. Checked by