Re: [Tutor] What's the invaild syntax? Error message and relative codesupplied.

2005-07-31 Thread Nathan Pinno
Hey, looks like this is my problem. ) I'll just have to be more careful in the future. - Original Message - From: "Alan G" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; Sent: Sunday, July 31, 2005 6:24 PM Subject: Re: [Tutor] What&#x

[Tutor] Is input a Python function or command?

2005-07-31 Thread Nathan Pinno
Is input a Python function or command? I need to know because I'm planning to use it as a variable, and don't want to get an error.   Thanks, Nathan ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Is input a Python function or command?

2005-07-31 Thread Nathan Pinno
Thanks Luke. Saved me quite a headache. I will use in_file instead. Makes more sense anyway. - Original Message - From: "luke p" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Sent: Sunday, July 31, 2005 7:59 PM Subject: Re: [Tutor] Is in

Re: [Tutor] Is input a Python function or command?

2005-08-01 Thread Nathan Pinno
Just remembered that input is for integers! Oops! Shouldn't have asked! And in_file makes more sense because I'm loading a file with it. - Original Message - From: "Nathan Pinno" <[EMAIL PROTECTED]> To: "Luke P" <[EMAIL PROTECTED]> Cc: "Tut

[Tutor] I've run into a jam on the exercise on file I/O

2005-08-01 Thread Nathan Pinno
grade    elif which != -1:    print "Invalid Grade Number"    else:    print "Student not found"    elif menu_choice == 5:    filename = raw_input("Filename to load: ")    load_grades(students,filenam

Re: [Tutor] I've run into a jam on the exercise on file I/O

2005-08-01 Thread Nathan Pinno
Maybe I should use assignments instead? - Original Message - From: Adam Bark To: Nathan Pinno Cc: tutor@python.org Sent: Monday, August 01, 2005 2:47 PM Subject: Re: [Tutor] I've run into a jam on the exercise on file I/O >>> max_points = [2

[Tutor] Question

2005-08-01 Thread Nathan Pinno
Hi all,   Just curious to wonder if Python can be used to write a program to check an HTTP mail server for mail, and check more than one server, even if they are using different proxies, i.e. HTTP for one and SMTP for the other.   Thanks, Nathan Pinno,Crew, Camrose McDonalds and owner

Re: [Tutor] I've run into a jam on the exercise on file I/O

2005-08-01 Thread Nathan Pinno
What if I were to use ID's for the students and use the ID's as the sequence index, and link the students and their grades to the IDs? Just a suggestion, Nathan Pinno - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" &

[Tutor] I need advice.

2005-08-01 Thread Nathan Pinno
Hey all,   I want to write a program that will convert time in any other time zone to my time zone. Would it be better to use the Python time molecule or just a whole bunch of if statements?   Waiting eagerly for an answer, Nathan Pinno,Crew, Camrose McDonalds and owner/operator of Woffee

[Tutor] Question about BASIC and Python

2005-08-01 Thread Nathan Pinno
Hi all,   I had a co-worker say to me at work that Python was related to or based upon BASIC. Is this true, and if not, how can I tell my friend why they are similar?   Nathan Pinno,Crew, Camrose McDonalds and owner/operator of Woffee BEGIN:VCARD VERSION:2.1 N:Pinno;Nathan;Paul;Mr. FN:Pinno

Re: [Tutor] Question about BASIC and Python

2005-08-01 Thread Nathan Pinno
Thanks Bob and Liam. I was wondering myself. - Original Message - From: Bob Gailer To: Nathan Pinno ; Tutor mailing list Sent: Monday, August 01, 2005 11:09 PM Subject: Re: [Tutor] Question about BASIC and Python At 06:13 PM 8/1/2005, Nathan Pinno wrote

Re: [Tutor] I need advice.

2005-08-01 Thread Nathan Pinno
I forgot to tell that I use Python 2.2.3. When I first got Python, I got 2.4.1, but it refused to run the second time. So I went and got 2.2.3. Your answer would make sense if I had 2.4.1, but I don't. - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: &

Re: [Tutor] I need advice.

2005-08-02 Thread Nathan Pinno
I think I'll leave this one for someone else. I got too confused too quick. - Original Message - From: "Alan G" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; "Tutor mailing list" Sent: Tuesday, August 02, 2005 1:47 AM Sub

[Tutor] Question about resetting values

2005-08-02 Thread Nathan Pinno
I am writing a Blackjack program, and was wondering how to reset the values to zero, e.g. cash = 0?   Thanks, Nathan Pinno,Crew, Camrose McDonalds and owner/operator of Woffee BEGIN:VCARD VERSION:2.1 N:Pinno;Nathan;Paul;Mr. FN:Pinno, Nathan Paul ORG:Woffee;Executive TITLE:Owner/operator TEL

Re: [Tutor] I need advice.

2005-08-02 Thread Nathan Pinno
I am now using Python 2.4.1, but decided to abandon it. It got too confusing too fast. I'm better off writing simple games and apps for now. - Original Message - From: "Nathan Pinno" <[EMAIL PROTECTED]> To: "Danny Yoo" <[EMAIL PROTECTED]> Cc: "

Re: [Tutor] Question about resetting values

2005-08-02 Thread Nathan Pinno
Never mind all. I was just being stupid as usual. I thought that there might be a Python command for resetting and wanted to find out if that was the case. - Original Message - From: "Alan G" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]&

[Tutor] I need advice about which way to go.

2005-08-02 Thread Nathan Pinno
is the right and correct way to go? Also for blackjack, I want to use it as playertotal = playertotal + n, and computertotal = computertotal + n. or 1,2,3, etc. Which is better?   Thanks, Nathan Pinno,Crew, Camrose McDonalds and owner/operator of Woffee BEGIN:VCARD VERSION:2.1 N:Pinno;Nathan

Re: [Tutor] I need advice about which way to go.

2005-08-03 Thread Nathan Pinno
igured out separately. The two games are indeed separate, too much trouble to do them a 1 program that can play both games. Maybe I should have shown my code and asked using the code as a visual reference. - Original Message - From: "Alan G" <[EMAIL PROTECTED]> To: "

Re: [Tutor] I need advice about which way to go.

2005-08-03 Thread Nathan Pinno
aw_input("Menu choice: "))   def card_choice():    return random.choice(range(1,14)   def types():    return random.choice(range(1,5)   def player_cards():    print a," of ",t1    print b," of ",t2   print "Blackjack"print "By Nathan Pinno"while 1: 

Re: [Tutor] I've run into a jam on the exercise on file I/O

2005-08-03 Thread Nathan Pinno
I've been chatting with Albertito on MSN and came up with this solution: int(x), and change student into student ids, and remove #Max. Will this work, or will I need to add sequential IDs? - Original Message - From: "Alan G" <[EMAIL PROTECTED]> To: "Natha

Re: [Tutor] I've run into a jam on the exercise on file I/O

2005-08-03 Thread Nathan Pinno
else: print "Student not found" elif menu_choice == 5: filename = raw_input("Filename to load: ") load_grades(students,filename) elif menu_choice == 6: filename = raw_input("Filename to save: ") save_grades(s

Re: [Tutor] I need advice about which way to go.

2005-08-03 Thread Nathan Pinno
mond, Club, or Spade) - Original Message - From: Bob Gailer To: Nathan Pinno ; Tutor mailing list ; Yoo, Danny Sent: Wednesday, August 03, 2005 1:03 PM Subject: Re: [Tutor] I need advice about which way to go. At 11:36 AM 8/3/2005, Nathan Pinno wrote: Here is the code the

Re: [Tutor] Help with file I/O.

2005-08-03 Thread Nathan Pinno
When I ran my new password program, using getpass, it warned me that passwords might be echoed, because there was a problem with getpass. How do I fix this? - Original Message - From: "Alan G" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]

Re: [Tutor] Help with file I/O.

2005-08-03 Thread Nathan Pinno
quot; was not found." def print_login_info(): print "Login Info" for x in sitelist.keys(): print "Site: ",x," \tID: ",sitelist[x][0]," \tPassword: ",sitelist[x][1],"\n" print "The Password Program" print "By Nat

[Tutor] What's the invalid syntax? Code supplied

2005-08-03 Thread Nathan Pinno
highlighted the last " if that will help any.   I can't show you the error due to the fact that the error appeared in a separate box, instead of in the IDLE window.   If you need the rest of the code, just ask. It ran perfect before I added file I/O.   Thanks in advance, Nathan PinnoCre

Re: [Tutor] Help with file I/O.

2005-08-03 Thread Nathan Pinno
It does indeed echo. I forgot to add that. - Original Message - From: "Nathan Pinno" <[EMAIL PROTECTED]> To: "Alan G" <[EMAIL PROTECTED]>; "Alberto Troiano" <[EMAIL PROTECTED]>; "Danny Yoo" <[EMAIL PROTECTED]>; "luk

Re: [Tutor] Help with file I/O.

2005-08-03 Thread Nathan Pinno
Thanks Danny. Albertito and me thought there might be a bug there. I see that guess was wrong. - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: "Tutor" Sent: Wednesday, August 03, 2005 7:41

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-03 Thread Nathan Pinno
The only thing I see there is [0] and [1]. Should that be passcard instead? - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: "Tutor mailing list" Sent: Wednesday, August 03, 2005 7:36 PM Subj

Re: [Tutor] Help with file I/O.

2005-08-03 Thread Nathan Pinno
I'm running Windows XP Home, but Albertito tried the same code on XP Pro, and got the same response. - Original Message - From: "Kristian Zoerhoff" <[EMAIL PROTECTED]> To: Sent: Wednesday, August 03, 2005 7:42 PM Subject: Re: [Tutor] Help with file I/O. >

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-03 Thread Nathan Pinno
That's part of my signature. It describes who I am. - Original Message - From: Bob Gailer To: Nathan Pinno ; Tutor mailing list Sent: Wednesday, August 03, 2005 7:48 PM Subject: Re: [Tutor] What's the invalid syntax? Code supplied At 06:21 P

[Tutor] How do I fix the following error? Code and error message supplied.

2005-08-03 Thread Nathan Pinno
"":    break    in_line = in_line[:-1]    [site,ID,passcard] = string.split(in_line,",")    sitelist[site] = sitelist   def save_file(sitelist,filename):    out_file = open(filename,"w")    for site in sitelist.keys():    out_file.write(site

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-03 Thread Nathan Pinno
See my latest message for how I fixed this error and got another in its place. - Original Message - From: "Nathan Pinno" <[EMAIL PROTECTED]> To: "Danny Yoo" <[EMAIL PROTECTED]> Cc: "Tutor mailing list" Sent: Wednesday, August 03, 2005 7:48

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-03 Thread Nathan Pinno
Sure, the problem was that I had forgotten a comma before the "\n". I added a comma and it came up with another error that I fixed on my own, then the current error came up. - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno&

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-03 Thread Nathan Pinno
I forgot to add that it works because commas separate it into groups so that when the reads the file it has output, the program can split it into the site, ID, and passcard. - Original Message - From: "Nathan Pinno" <[EMAIL PROTECTED]> To: "Danny Yoo" <

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-03 Thread Nathan Pinno
I added a plus sign to show Python to add "\n" or a new line to end of the file. - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: "Tutor mailing list" Sent: Wednesday, August 03,

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-03 Thread Nathan Pinno
xt to export: ") filename = raw_input("File to write to: ") out_file = open(filename,"w") out_file.write(text) out_file.close() - Original Message - From: "Nathan Pinno" <[EMAIL PROTECTED]> To: "Danny Yoo" <[EMAIL PROTECTED]> Cc: "Tu

Re: [Tutor] How do I fix the following error? Code and error message supplied.

2005-08-03 Thread Nathan Pinno
Hey Danny and all, Alan's tutorial did help me, and showed me how to correctly load a file upon entry, and save upon exit. It should be smooth sailing from here on it. Thank again, Nathan --- Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pin

Re: [Tutor] How do I fix the following error? Code and errormessage supplied.

2005-08-04 Thread Nathan Pinno
Thank you to all. The Password Program works perfectly. Time for me to relax and finish up my other loose project ends, and then I'll be able to start another major project. - Original Message - From: "Nathan Pinno" <[EMAIL PROTECTED]> To: "Danny Yoo"

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-05 Thread Nathan Pinno
Hi all, It's Zoffee now, thanks to a Google search. Don't want to confuse customers. :) For your info, Zoffee is a company where I sell computer programs online which I write. Simple enough, eh? G2G, Nathan Pinno, Crew, Camrose McDonalds and owner/operator of Zoffee - Origin

[Tutor] Is there a qucker method than the following?

2005-08-05 Thread Nathan Pinno
t;Jack","Queen","King"]hand = {numbers:cards}   def menu():    print "1. Deal a hand"    print "2. Exit"   def option():    return int(raw_input("Option: "))   def deal():    a,b,c,d,e = random.choice(13)   print "The Five Card Dealer&q

[Tutor] What's the invalid syntax? Code supplied

2005-08-05 Thread Nathan Pinno
types = {    '0' : ["Diamonds"]    '1' : ["Hearts"]    '2' : ["Spades"]    '3' : ["Clubs"]    }playercards = [a,b,c,d,e]t = [t1,t2,t3,t4,t5]def menu():    print "1. Deal a hand"    print "2. Exit&q

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-07 Thread Nathan Pinno
to shreds by you, and dash my idea before it even takes off. I will keep my ideas to myself, Nathan Pinno --- I wanted help, and you critised me, I wanted aid, and you refused, So I will do it myself! --Auth

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-07 Thread Nathan Pinno
All, I do understand that concept. I was trying to implement it, and got stuck, so I asked for help. Nathan --- I wanted help, and you criticized me, I wanted aid, and you refused, So I will do it myself! --Author unknown

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-07 Thread Nathan Pinno
After reading what Steve Reighard and Danny wrote, I've decided that I was wrong. I'm sorry. I'm almost done my new algorithm, and will share it with the group.   Nathan ---I wanted help, and you criticized me,I want

Re: [Tutor] reading random line from a file

2007-07-18 Thread Nathan Coulter
> ---Original Message--- > From: Tiger12506 <[EMAIL PROTECTED]> > Yuck. Talk about a one shot function! Of course it only reads through the > file once! You only call the function once. Put a second print randline(f) > at the bottom of your script and see what happens :-) > > JS >

[Tutor] Is it possible?

2008-02-08 Thread Nathan McBride
Is it possible to write a program that you pipe other programs through and it measures the MBs per second of data moved? Like I could pipe it a cp and find out how fast the cp is working? Thanks, Nate ___ Tutor maillist - Tutor@python.org http://mail

[Tutor] beginner pexpect question

2008-02-13 Thread Nathan McBride
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey guys, I'm practically still a beginner with python. I am working on a program that originally I used popen for but then switched to pexpect because it was easier for me to understand. I was hoping someone could help me get this working: I do a:

Re: [Tutor] beginner pexpect question

2008-02-13 Thread Nathan McBride
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Anyone have any recomendations? Seems like it is giving it the passwords since it finishes cleanly, but maybe not like I think? Nate Nathan McBride wrote: > Hey guys, > > I'm practically still a beginner with python. I am workin

Re: [Tutor] Use functions re avoid Re: Can the following algorithm be improved?

2005-08-09 Thread Nathan Pinno
jamin Franklin --- - Original Message - From: "Brian van den Broek" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: "Tutor mailing list" Sent: Sunday, August 07, 2005

Re: [Tutor] Use functions re avoid Re: Can the following algorithmbe improved?

2005-08-09 Thread Nathan Pinno
Hey all, I just fixed it so that it prints. The problem was that it returned the cards instead of printing them. Nathan --- Early to bed, Early to rise, Makes a man healthy, wealthy, and wise. --Benjamin Franklin

[Tutor] (OT) Info on card games.

2005-08-09 Thread Nathan Pinno
x27;s http://www.pagat.com/ and I found it very useful when I did my research on Blackjack, Poker and Cribbage.   Nathan. ---Early to bed,Early to rise,Makes a man healthy, wealthy, and wise.--Benjamin

Re: [Tutor] deck dealing program

2005-08-09 Thread Nathan Pinno
Thanks Luke. You've helped me out of a jam that I was going to ask without even asking.   Nathan ---Early to bed,Early to rise,Makes a man healthy, wealthy, and wise.--Benjamin Fra

Re: [Tutor] Use functions re avoid Re: Can the following algorithmbe improved?

2005-08-09 Thread Nathan Pinno
Brian van den Broek" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: "Tutor mailing list" Sent: Tuesday, August 09, 2005 3:23 PM Subject: Re: [Tutor] Use functions re avoid Re: Can the following algorithmbe improved? > Nathan Pinno said unt

[Tutor] What can I do with this code?

2005-08-09 Thread Nathan Pinno
w_input("First number:"))    y = int(raw_input("Second number:"))    print x*y    print random.choice(cool)    elif start == "No":    breakprint "Goodbye and happy problem solving!"   What can I do with it, other than let it be a fun exam

[Tutor] How do I fix this ValueError?

2005-08-09 Thread Nathan Pinno
ite]     else: print site," was not found."   def print_login_info():    print "Login Info"    for site in sitelist.keys():    print "Site: ",site," \tID: ",sitelist[site][0]," \tPassword: ",sitelist[site][1],"\n"   print &q

Re: [Tutor] How do I fix this ValueError?

2005-08-09 Thread Nathan Pinno
nklin --- - Original Message - From: <[EMAIL PROTECTED]> To: "Tutor mailing list" Sent: Tuesday, August 09, 2005 7:13 PM Subject: Re: [Tutor] How do I fix this ValueError? > Quoting Nathan Pinno <[EMAIL PR

[Tutor] How to I make it save the data properly? (was Re: How do I fix this ValueError?)

2005-08-09 Thread Nathan Pinno
site = raw_input("Site: ") if sitelist.has_key(site): del sitelist[site] else: print site," was not found." def print_login_info(): print "Login Info" for site in sitelist.keys(): print "Site: ",site,"

Re: [Tutor] How to I make it save the data properly? (was Re: How do Ifix this ValueError?)

2005-08-09 Thread Nathan Pinno
I fixed it. The problem was this line: ID = line.strip().strip() I fixed it so that it now reads: ID = store.next().strip() As a result, the program runs perfectly. Nathan Pinno --- Early to bed, Early to rise, Makes a man healthy

[Tutor] Question on listing cards, then deleting one or more items by user's choice.

2005-08-09 Thread Nathan Pinno
Say I deal 5 cards, and then list them. How would I print the list of cards, with the numbers of each card(the position in the list)? Then delete a certain card or cards, based upon the user's choice?.   Nathan ---Early to bed,

[Tutor] Is it possible to...

2005-08-14 Thread Nathan Pinno
stion, but this one has been bugging me.   Nathan ---Early to bed,Early to rise,Makes a man healthy, wealthy, and wise.--Benjamin Franklin--- BEGIN:VCARD VERSION:2.1 N:

[Tutor] How can I make this run right?

2005-08-14 Thread Nathan Pinno
The following code is supposed to take in a number, and print number!: n = int(raw_input("Number: "))x = n-1while 1:    t = n*x    while x > 1:    x -= 1    else:    breakprint t Why isn't it working, and how can I make it print out the correct output?   Thanks

Re: [Tutor] How can I make this run right?

2005-08-15 Thread Nathan Pinno
--- - Original Message - From: "Alan G" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; "Tutor mailing list" Sent: Monday, August 15, 2005 2:20 AM Subject: Re: [Tutor] How can I make this run right? >> The following code i

[Tutor] Is there anyway to set how many numbers are used after the decimal in floating numbers?

2005-08-18 Thread Nathan Pinno
Hi all,   Is there anyway to set how many numbers are used after the decimal in floating numbers? It would be nice if the answer could be rounded to 2 decimal spots, instead of the ten millionths spot.   Thanks in advance, Nathan Pinno

Re: [Tutor] Is there anyway to set how many numbers are used after the decimal in floating numbers?

2005-08-18 Thread Nathan Pinno
I want to use it for a currency exchange program. It's useful, then the user wouldn't have to round it himself/herself, and mistakes could be avoided. Nathan Pinno --- Early to bed, Early to rise, Makes a man healthy, wealthy

Re: [Tutor] reading excel and access files

2005-08-22 Thread Nathan Coulter
ZIYAD A. M. AL-BATLY wrote: > On Mon, 2005-08-22 at 18:57 +0100, Alan G wrote: > >>>hello, can python read excel and access files? >> You might also have a look at http://sourceforge.net/projects/pyexcelerator -- Poor Yorick ___ Tutor maillist - Tut

Re: [Tutor] reading excel and access files

2005-08-22 Thread Nathan Coulter
ZIYAD A. M. AL-BATLY wrote: > On Mon, 2005-08-22 at 18:57 +0100, Alan G wrote: > >>>hello, can python read excel and access files? >> You might also have a look at http://sourceforge.net/projects/pyexcelerator -- Poor Yorick ___ Tutor maillist - Tuto

[Tutor] How to save updated values in a program?

2005-09-01 Thread Nathan Pinno
want to know if every time I exit, the next time I enter the program I have to rechange the values.   Thanks, Nathan ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Do I have to include certain items in the setup.py file?

2005-09-16 Thread Nathan Pinno
Hey all,   I was curious about what I have to include in the setup.py file. Do I have to include such statements as "import random" if the code uses import random and the random functions in its code for example?   Hopefully this is not a beginner's question, Nathan Pinno For

Re: [Tutor] Do I have to include certain items in the setup.py file?

2005-09-16 Thread Nathan Pinno
It sure does. Thanks Danny. One final question: Is it possible to write one setup.py and use it for multiple Python programs? Thanks, Nathan Pinno For great sites go to: http://falcon3166.tripod.com For great products go to: http://zoffee.tripod.com - Original Message - From: "Dann

Re: [Tutor] Do I have to include certain items in the setup.py file?

2005-09-16 Thread Nathan Pinno
It sure does! Thanks. For great sites go to: http://falcon3166.tripod.com For great products go to: http://zoffee.tripod.com - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: "Tutor mailing list"

[Tutor] Will the following code ever exit?

2005-09-16 Thread Nathan Pinno
Correct!"   correct += 1   cq += 1else:   print "Questions: ",q   print "Correct: ",correct   print "Percent Correct: ",(correct/q)*100   Thanks, Nathan Pinno ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

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

2005-09-16 Thread Nathan Pinno
oodbye."   It just prints out for an example:   Questions:  17Correct:  0Percent Correct:  0Goodbye.   Thanks, Nathan Pinno BEGIN:VCARD VERSION:2.1 N:Pinno;Nathan;Paul;Mr. FN:Pinno, Nathan Paul NICKNAME:Spam_swatter ORG:Woffee;Executive TITLE:Owner/operator TEL;WORK;VOICE:7806085529 TEL;CELL;VOICE:

Re: [Tutor] Will the following code ever exit?

2005-09-16 Thread Nathan Pinno
Thanks, but when I run the code, even after that change it always just prints the questions, correct questions(which is always 0), and percent right(always 0). How do I make it enter the quiz. Thanks, Nathan Pinno - Original Message - From: "John Fouhy" <[EMAIL PROTECTED]

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

2005-09-16 Thread Nathan Pinno
cq is for "current question" and q is for "question" therefore cq >= q should be correct most of the time - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: Sent: Friday, September 1

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

2005-09-16 Thread Nathan Coulter
Byron wrote: > 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 mo

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

2005-09-16 Thread Nathan Pinno
at me. Oh well, guess I can't get help as a newbie... I guess I should have erased my signature from these messages sooner rather than later, to prevent this e-mail. Regards, Nathan Pinno > Date: Fri, 16 Sep 2005 19:03:10 -0700 > From: Byron <[EMAIL PROTECTED]> > Subject: Re: [

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

2005-09-16 Thread Nathan Pinno
Thanks to hear that. I will keep posting, though no sales, so not a great business model. Any help with the original question? Thanks, Nathan Pinno - Original Message - From: "Byron" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; Sent: Fr

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

2005-09-16 Thread Nathan Pinno
cq += 1 elif guess == answer: print "Correct!" correct += 1 cq += 1 else: print "Questions: ",q print "Correct: ",correct print "Percent Correct: ",(cq/q)*100 break print "

[Tutor] How do fix this error?

2005-09-16 Thread Nathan Pinno
right: ",(correct/q)*100print "Goodbye." How do I fix it so that it runs without anymore errors or problems?   Thanks for the help so far, Nathan Pinno ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Thank you all! was (Re: How do fix this error?)

2005-09-17 Thread Nathan Pinno
Hey all,   I would like to thank everyone here and at Programmer's Heaven for all their help. Thanks again!   Gratefully, Nathan Pinno - Original Message - From: "Alan G" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; <tutor@python

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

2005-09-17 Thread Nathan Pinno
I can see that I was wrong. I was tired, and I don't always think too smart. It should be cq <= q. :) Nathan Pinno - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: Sent: Saturday, September 1

Re: [Tutor] Maths: getting degrees from radians (or am I wrong?)

2005-09-20 Thread Nathan Coulter
John Fouhy wrote: > On 21/09/05, R. Alan Monroe <[EMAIL PROTECTED]> wrote: > >>> >>> math.degrees(_) <--- in all my time on tutor >> >> I have never noticed >> this underscore trick >> before > > > I'm not a big

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

2005-09-21 Thread Nathan Pinno
of it myself. Fair enough? Farewell for now, Nathan Pinno. - Original Message - From: "Byron" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; Sent: Friday, September 16, 2005 9:25 PM Subject: Re: [Tutor] Why won't it enter the quiz? > Nath

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

2005-09-22 Thread Nathan Pinno
  http://zoffee.tripod.com/purchasecompprogs.htm is the URL. - Original Message - From: Adam To: Nathan Pinno Sent: Thursday, September 22, 2005 5:21 AM Subject: Re: [Tutor] Challenge [was Re: Why won't it enter the quiz?] What's the URL? O

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

2005-09-22 Thread Nathan Pinno
The URL is http://zoffee.tripod.com/purchasecomprogs.htm, and here is a third alternative: If the group says it is okay, I'll add them to the By: line as The Python Group, and I'll donate half of the sales to a charity of the group's choice.   Nathan Pinno - O

[Tutor] Help with pi and the math module.

2005-09-23 Thread Nathan Pinno
Hi all,   I need help with pi and the math module. I had import math at the top of a program, but when it came to diameter*pi, it said that pi was not defined.   How do I use it correctly?   Thanks, Nathan Pinno ___ Tutor maillist - Tutor

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

2005-09-26 Thread Nathan Pinno
Bob,   I did what you suggested. Take another look, and tell me if you were a potential customer, would you purchase something?   Why not take the challenge? It's not like I'm asking much.   Nathan Pinno - Original Message - From: bob To: Nathan Pinno

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

2005-09-26 Thread Nathan Pinno
The actual URL is http://zoffee.tripod.com/purchasecompprogs.htm - Original Message - From: bob To: Nathan Pinno Cc: tutor@python.org Sent: Monday, September 26, 2005 11:54 AM Subject: Re: [Tutor] Challenge [was Re: Why won't it enter the quiz?] At

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

2005-09-30 Thread Nathan Pinno
Lisa and all,   I got rid of that portion of my site. All that's there now is the e-book publishing part of my site.   Nathan Pinno - Original Message - From: Lisa Fukui To: Nathan Pinno Sent: Friday, September 30, 2005 11:22 AM Subject: Re: [Tutor] Challenge [w

[Tutor] Can anyone teach me...?

2005-10-12 Thread Nathan Pinno
Hey all, When I said that I might go to Visual Basic in an earlier message, someone replied by saying that I should ask here how to do it in Python. Well, I'm asking now: Can anyone teach me how to make a simple program that uses a GUI? Thanks, Nathan Pinno Crew, McDonalds Restaurant an

[Tutor] Can anyone help me?

2005-10-27 Thread Nathan Pinno
Hey all, I am trying to create a program that draws 6 numbers between 1 and 49 at random for creating lottery tickets. I want to have a better chance when I play. Can anyone help me code this or show me how to, please? Thanks, Nathan Pinno For great sites go to: http://falcon3166

Re: [Tutor] Can anyone help me?

2005-10-27 Thread Nathan Pinno
yself. Nathan Pinno Crew, McDonalds Restaurant and fan extraordinare of the Oilers. http://falcon3166.tripod.com From: bob <[EMAIL PROTECTED]>To: "Nathan Pinno" <[EMAIL PROTECTED]>, Subject: Re: [Tutor] Can anyone help me?Date: Thu, 27 Oct 2005 21:35:07 -0700>At 07:07 PM

Re: [Tutor] ***[Possible UCE]*** Can anyone help me?

2005-10-28 Thread Nathan Pinno
Thanks Martin. You have a solid point. It would be a fun programming exercise anyway...I haven't programmed in ages it seems. :) Nathan Pinno For great sites go to: http://falcon3166.tripod.comMSN Messenger: [EMAIL PROTECTED],comYahoo! Messenger: spam_swatter31ICQ: 199020705AIM: f3m

Re: [Tutor] Can anyone help me?

2005-10-28 Thread Nathan Pinno
range(1,50)) numbers.append(draw) print numbers numbers = [] elif q == 2: break else: print "Read the instructions please." [/code] Enjoy! Nathan Pinno For great sites go to: http://falcon3166.tripod.com MSN Messenger: [EMAIL PROTECTED],com Yahoo! Messenger

[Tutor] Albertito and I want you to help us create a search engine.

2005-10-28 Thread Nathan Pinno
Hey all,   Albertito and I want you all to help us create a search engine for our site. Albertito heard that Google was created in Python, is this true? I want to know if such a task is possible, and if so, who is willing to help us create the script needed for our site. Thanks, Nathan Pinno Crew

[Tutor] How I use images in a GUI?

2005-11-06 Thread Nathan Pinno
Hey all,   I have a question that I can't figure out, despite reading the help and everything else. How do I use an image or images in a Graphic User Interface, and link them to parts of my code i.e. a picture of a game piece to its value?   Thanks in advance, Nathan

Re: [Tutor] How I use images in a GUI?

2005-11-06 Thread Nathan Pinno
Title: Message Liam, I am using Pygame, but I am still don't know how to use it. I read it, and it confused me. - Original Message - From: Liam Clarke-Hutchinson To: 'Nathan Pinno' Cc: 'tutor@python.org' Sent: November 6, 2005 3:47 PM Subje

[Tutor] Does Pygame allow background images?

2005-11-07 Thread Nathan Pinno
Hey all,   Does Pygame allow background images (i.e. a hockey rink for a hockey game)?   Thanks, Nathan Pinno ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] How do I make a text box pop up in a GUI before the main part of the program loads?

2005-11-12 Thread Nathan Pinno
Hey all,   How do I make a text box pop up in a GUI before the main part of the program loads?   Thanks, Nathan Pinno, Owner/operator of The Web Surfer's Store. http://www.the-web-surfers-store.com/   BEGIN:VCARD VERSION:2.1 N:Pinno;Nathan;Paul;Mr. FN:Pinno, Nathan Paul ORG:Z

Re: [Tutor] How do I make a text box pop up in a GUI before the mainpart of the program loads?

2005-11-12 Thread Nathan Pinno
Actually, I'm going to be using Pygame. I need to know, because I want to pop up a polite explanation of how to play the game and a reminder. Nathan Pinno - Original Message - From: Alan Gauld To: Nathan Pinno ; tutor@python.org Sent: November 12, 2005 10:47 AM Su

<    1   2   3   4   >