[Tutor] G'day

2006-02-15 Thread John Connors
G'day, I'm new to Python and new to the list and just thought I'd say a quick hello before asking my 1st dumb question. My name is John and I live in Australia, I've been using computers since about 1983. I haven't done any programming since the commodore 64 basic days, I was fairly proficient w

Re: [Tutor] G'day

2006-02-18 Thread John Connors
G'day, Thanks to the people who replied, I only found them today and hopefully I didn't miss any. For some reason hotmail was sending them to junk even though it allowed the 1st message through and I had added tutor@python.org to my contact list. Should be sorted now I hope! > > print "Hello,

[Tutor] First Try

2006-02-19 Thread John Connors
G'day :) I started getting sick of reading tutorials so for a bit of a break I set myself the task of writing a program to pick lotto numbers, 6 numbers between 1 and 44 (inclusive). I had done this many years before in basic and I thought back then it would be a simple task but I struck a prob

[Tutor] First Try 1.1

2006-02-20 Thread John Connors
G'day, Thanks for the input on my lotto number selector program, very much appreciated and I learnt a lot. I've (hopefully) cleaned it up a little, and expanded it to write the numbers to a text file. I'm sure there must be a better way of doing it then the way I have. I understand that the

[Tutor] First Try 1.2

2006-02-21 Thread John Connors
G'day :) I've added a little more to the program. It now sorts the game numbers from lowest to highest which makes filling out the tickets a lot easier, I've been putting off doing this because I wasn't sure how to go about it but once I started looking I found python does it all for me with .s

Re: [Tutor] First Try 1.2

2006-02-22 Thread John Connors
G'day, Added a power ball option to the lotto program today. The program does way more then I ever intended when I started it so I'll try a new project. Maybe I'll come back to it when I try out Tkinter and try to give it a GUI. Anywayhere's my latest effort. import random # store the /h

[Tutor] Repeating a routine

2006-02-22 Thread John Connors
G'day, With my only programming experience being C-64 Basic I'm finding that I struggle a bit understanding some of the concepts of Python, I wish I could block basic right out of my brain. One of the things I can't get a grasp of is how to repeat a routine many times. For example a simple d

Re: [Tutor] First Try 1.2

2006-02-22 Thread John Connors
G'day Kent, Thanks for the input. >The comments don't really add anything to the program. Comments that >restate exactly what the code is doing are not that helpful. The code >should be clear by itself. As a beginner they may seem like a helpful >crutch but you will get better at reading the cod

Re: [Tutor] Repeating a routine

2006-02-22 Thread John Connors
G'day, I think my peanut sized brain is starting to understand how to do this. I tried with a simple dice game where 4 dice are rolled, if the total of the last 2 dice rolled is 6 you win. It's kinda pointless using 4 dice rolls when only 2 are needed but I wanted to prove to myself I could cal

Re: [Tutor] Repeating a routine

2006-02-22 Thread John Connors
G'day Sean, >Jumping to the middle of a book or movie will lead to similar confusion. > >Give a look at Dive Into Python. Available as either a book or online. I have it and it's a great book, and I have worked my way through a lot of it unfortunately my brain can't take something in unless I do

[Tutor] Importing Modules

2006-04-24 Thread John Connors
G'day, I'm having trouble understanding the difference between, import sys and from sys import * It seems to me they both do the same thing. John _ New year, new job – there's more than 100,00 jobs at SEEK http://a.ninemsn.com.a

Re: [Tutor] How to compile _tkinter in Fedora Core 4

2006-04-25 Thread John Connors
G'day John, There is a problem with a recent python update and fedora, if you go to http://forums.fedoraforum.org/ and do a search in the forum for tkinter and/or idle you will find the fix. I'm running Fedora Core 5 and found I had to install tkinter, I had to do a yum install tkinter. Jo

[Tutor] Checking in lists

2006-04-26 Thread John Connors
G'day, I found something today that has me confused. I'm making a list of 6 random dice rolls and I want to check if any 1's or 5's were rolled. I tried this way first and it returns true even if there are no 1's or 5's. I'll use a roll of all 2's as an example. rollList = [2,2,2,2,2,2] if 1

Re: [Tutor] Alan Gauld's tut - namespaces

2006-04-26 Thread John Connors
G'day Payal, I had trouble understanding the namespaces section of the tutorial too but it all clicked the other day when Alan explained the difference between import first and from first import * John >Hi, >In Alan's tutorial I haven't got the example of print42() even after >reading the expl

Re: [Tutor] Alan Gauld's tut - namespaces

2006-04-26 Thread John Connors
G'day Alan, >However I'll refrain from saying much more since I do think the >namespaces topic could be significantly improved if only I could >find better words and examples. > >So please everyone, feel free to try to explain this idea to Payal >so that I can steal your ideas for the tutorial!!

[Tutor] How Big Is Too Big?

2006-04-29 Thread John Connors
G'day, Just wondering how many lines of code is the maximum to post in the list to have it critiqued. I realise people are using their own time to help others in here for no real personal gain and I would hate to impose on their goodwill. Would about 100 lines of code be considered too much?

[Tutor] Silly Dice Game

2006-04-29 Thread John Connors
G'day, The wife and I play a silly dice game and I thought it would be a good challange for me to write it as a program. No specific question, just wondering if my technique is ok and is there anything that could be done better. The 2 hardest things I find as a python beginner who has no real

Re: [Tutor] Silly Dice Game

2006-04-29 Thread John Connors
G'day John, >If I were you, I would look at separating more of my program out into >functions. Good use of functions will make your program more >readable, easier to debug, and easier to change, should the rules of >your dice game change :-) Yes, the rules change on a regular basis, usually by t

[Tutor] Books

2006-05-03 Thread John Connors
G'day, I know this is a difficult question to answer because it's probably more a matter of personal taste than anything else. I'm retired so money has to be watched fairly carefully and books are kind of expensive down here in Australia but the Mrs has said I can lash out on a book for my bir

[Tutor] Not Really Questions

2006-06-04 Thread John Connors
G'day, While the list is kind of slow I thought I'd post a few thoughts on a couple of things in Python that bug me. They're not really questions but maybe someone can help me understand. The first one is lists... I can't for the life of me understand why a list starts at zero. In everything e