Re: [Tutor] Selecting from list

2013-07-18 Thread Steven D'Aprano
On 19/07/13 10:18, Jim Mooney wrote: On 18 July 2013 10:27, Hs Hs wrote: [...] (sorry this is not homework question. I want to avoid looping, because I have 300K lines to parse through) Thanks Hs. Not sure what you want to do. If you only want to fulfill the test once, here is a way without

Re: [Tutor] What every computer science major should know

2013-07-18 Thread Joel Goldstick
On Thu, Jul 18, 2013 at 7:13 PM, Jim Mooney wrote: > Alan Gauld > > > Except not all input devices are serial and not all systems take input, > some > > only generate output... But as a generalization its not bad :-) > > Except I stole it from Alan Turing ;') > > points for that! > Jim > ___

Re: [Tutor] What every computer science major should know

2013-07-18 Thread Alan Gauld
On 18/07/13 23:39, Jim Mooney wrote: Here is how every computer on earth works, even those using Java. It's also how DNA works. I just saved you 200 grand in ruinous student loans ;') Computer Science in six lines: Read serial input device: Until: if serial input device says Stop

Re: [Tutor] Selecting from list

2013-07-18 Thread Alan Gauld
On 18/07/13 18:27, Hs Hs wrote: hi list: Hi, please don't use an old thread to start a new one. This message appeared under a thread dated back in January. I nearly gave up looking for the unread message that my reader said was there. Start a new thread - you'll get better responses if you do

Re: [Tutor] What every computer science major should know

2013-07-18 Thread Alan Gauld
On 14/07/13 02:12, boB Stepp wrote: This may be of interest to some of us: http://matt.might.net/articles/what-cs-majors-should-know/ Interesting post Bob, thanks. I think I've covered about 50-60% of the recommended reading and about 75% of the topics. But... I think its a tad old fashioned

Re: [Tutor] Problems understanding code output

2013-07-18 Thread Dave Angel
On 07/10/2013 05:05 PM, s...@luo.to wrote: This is going a little over my head, please advice, what am I missing in here? While you're watching, we could also point out that you posted a message in html format. There were actually two messages inside there, and many people will see the

Re: [Tutor] New to programing and the tutoring system

2013-07-18 Thread Alan Gauld
On 16/07/13 15:15, Samuel Kroger wrote: guess it, it is very simple but for some reason it only works when it's in idle. What doesn't work? Do you get any output? An error message? How are you running it outside IDLE? -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/

Re: [Tutor] Python noob

2013-07-18 Thread Alan Gauld
On 16/07/13 13:31, Luka Radoš wrote: My question is, can you recommend me some learning materials? Or any kind of advice for me? Visit the Python.org website. It has lists of online tutorials you can use. Find one you like and make a start. If you get stuck ask questions here. Let us know wha

Re: [Tutor] hi

2013-07-18 Thread Joel Goldstick
On Fri, Jul 12, 2013 at 6:08 AM, Vick wrote: > Hi, > > ** ** > > I’m using Windows 7 and Python 2.7.3 > > ** ** > > I have written a code to perform a numerical solution to 1st order > Ordinary Differential Equations (ODEs). I have written codes for the famous > Runge Kutta 4th order and

[Tutor] Selecting from list

2013-07-18 Thread Hs Hs
hi list: In the following list, is there a simply way to find element less than 200 sandwiched between two numbers greater than 1000. a = [3389, 178, 2674, 2586, 13731, 3189, 785, 1038, 25956, 33551] in a, 178 is between 3389 and 2674.  How this particular list can be selected for further pro

Re: [Tutor] install on windows

2013-07-18 Thread Alan Gauld
On 11/07/13 06:46, larry seibold wrote: I am not sure what the problem is, but I responded to this thread in detail more than 12 hours ago, but have yet to see that response in the forum digest. Administrator rights and Adminstrator user were both required to install on windows XP. The proble

Re: [Tutor] Cannot understand what this means

2013-07-18 Thread Alan Gauld
On 15/07/13 09:53, #PATHANGI JANARDHANAN JATINSHRAVAN# wrote: websites. But now, there is a program from Google's Python Exercises whose main() part is already given to you. def main(): # This command-line parsing code is provided. # Make a list of command line arguments, omitting the [0

Re: [Tutor] install on windows

2013-07-18 Thread Alan Gauld
On 10/07/13 17:10, larry seibold wrote: this, as it must be the case with almost everyone, with similar issues with later windows releases. Here is what I found out. Even though I had administrator rights (my user was in the administrator group) on the windows XP machine, I was not the "Adminis

[Tutor] New to programing and the tutoring system

2013-07-18 Thread Samuel Kroger
Hello I am very very new to programing entirely, I have this book I am following, and I made a word jumbling game, it chooses a word from random from a turple I made, then scrambles the word and asks you to guess it, it is very simple but for some reason it only works when it's in idle. Here is the

[Tutor] Python noob

2013-07-18 Thread Luka Radoš
Hi :) I am a programming noob, but i dont consider myself as complete noob cause i did some C programming and i do have basic knowledge how programming works. Problem is that i did C programming 4 years ago when i was in high school. Now i study computer science and i was thinking to get some prog

[Tutor] Timestamp issues when importing from FireFox sqlite field

2013-07-18 Thread Paul Smith
All- Newb here so apologies upfront. Attempting timestamp translation via python importing info from sqlite datetime item in firefox ,'1369751000393000'. Typical unix date time translation fails. I noted micro second addition but even '1369751000393000' / 1e6 does not get a chew-able range, at le

Re: [Tutor] A list of 100+ projects to complete to master Python.

2013-07-18 Thread David Hutto
First thing you should learn is offsite backups, I've lost several projects in the works because of a hd mishap. Secondarily, I would recommend using existing primarily used python projects to 'reinvent the wheel' so to speak. Thirdly, make sure the code is properly documented, and serves a purpose

[Tutor] Interpret the contents of a line

2013-07-18 Thread Makarand Datar
Hi, I am working on a parser and my input file is a description about bunch of things written line by line. So for instance, consider the following two lines and what the corresponding variables in python should look like. example Line1: position = 1, 1, rotation = 90, 0, 0, mass = 120; Here I wa

[Tutor] Cannot understand what this means

2013-07-18 Thread #PATHANGI JANARDHANAN JATINSHRAVAN#
Hello All, I have just started out with python and was feeling pretty comfortable and confident to the point of solving problems from websites. But now, there is a program from Google's Python Exercises whose main() part is already given to you. def main(): # This command-line parsing cod

Re: [Tutor] Problems understanding code output

2013-07-18 Thread Andrew Van Valkenburg
I'm not really sure what you are asking, but the formatting for your code is pretty screwy. I reformatted it and changed the print statements slightly to make it more readable and it works fine from what I can see. def printMax(a, b): if a > b: print a, 'is maximum' elif a == b: print

[Tutor] Help installing Python3 in a particular folder

2013-07-18 Thread Alan
Hi there, I am doing this: cd /temp wget -c http://www.python.org/ftp/python/3.3.2/Python-3.3.2.tar.xz tar xvf Python-3.3.2.tar.xz cd Python-3.3.2 ./configure --prefix=/sw/arch make make test make install Then, when I try: /sw/arch/bin/python3 Traceback (most recent call last):