Re: [Tutor] Problem creating a search

2010-01-30 Thread Luke Paireepinart
On Sat, Jan 30, 2010 at 4:42 PM, Shashwat Anand wrote: > > > On Sun, Jan 31, 2010 at 3:47 AM, jim serson wrote: > >> Hi I am pretty new to python and programming in general. I am trying to >> create a search that takes a user input for a file location and user input >> to find a group of numbers

Re: [Tutor] please help me

2010-01-30 Thread Luke Paireepinart
[snip homework] > > > please help me > > This is a tutor mailing list. Tutor means we will help you learn, not that we will write your homework assignments for you for free. That is the opposite of learning. Try all of the programs. Give us what you have tried and what didn't work, why you tho

Re: [Tutor] can any one help

2010-01-30 Thread Luke Paireepinart
On Sat, Jan 30, 2010 at 5:40 PM, Grigor Kolev wrote: > Excuse me but I have question too. > Why when i write this function in python shell not work says > SyntaxError: invalid syntax > but when I use IDLE make endless loop > Your tabbing is probably messed up or something. You guys both need to b

Re: [Tutor] Tutor Digest, Vol 71, Issue 78

2010-01-30 Thread Aneftaoratos Aneftaoratos
s the list of all > pairs of characters c and > > > > > > > > >                its doubling 2 c, where c moves through all the letters of the > string "foobar" and prints it out. > > > > > > > > >                The result will look like: > > > > > > > > >        

[Tutor] please help me

2010-01-30 Thread invincible patriot
hii am stuck in these questions can someone please help me in solving and writing programme for these tasks please help me 1 1.1 Write a Python program with a loop that prints out a sequence of numbers as follows:151311...31-1 1.2 Write a small Python program that generates the list of all

Re: [Tutor] can any one help

2010-01-30 Thread Grigor Kolev
Excuse me but I have question too. Why when i write this function in python shell not work says SyntaxError: invalid syntax but when I use IDLE make endless loop Sorry I also teach Python. > def fibn(n): > a,b=15,2 > while a>n: > print a, # it is same like print a, a, b = a, a+b > You

Re: [Tutor] can any one help

2010-01-30 Thread invincible patriot
didnt got what u replied Subject: Re: [Tutor] can any one help From: grigor.ko...@gmail.com To: invincible_patr...@hotmail.com CC: anand.shash...@gmail.com; tutor@python.org Date: Sun, 31 Jan 2010 01:21:15 +0200 В 22:49 + на 30.01.2010 (сб), invincible patriot написа:

Re: [Tutor] can any one help

2010-01-30 Thread Grigor Kolev
В 22:49 + на 30.01.2010 (сб), invincible patriot написа: > ya definately, just give me the hint > > i made a prog for the first one but it when ran, saying RESTART in > active shell > > > def fibn(n): > a,b=15,2 > while a>n: > print a, > a,b=a,a+b > fibn(-1) > > > whatz rong in this prog

[Tutor] python 2.6 and MySQL fail

2010-01-30 Thread Rayon
I have installed python 2.6.4 on my windows7 laptop and MySQL dB. Every time I try to import the module I get this error. File "C:\Python26\lib\site-packages\MySQLdb\__init__.py", line 19, in import _mysql ImportError: DLL load failed: The specified module could not be found. I ne

Re: [Tutor] can any one help

2010-01-30 Thread invincible patriot
ya definately, just give me the hinti made a prog for the first one but it when ran, saying RESTART in active shell def fibn(n):a,b=15,2while a>n: print a, a,b=a,a+b fibn(-1) whatz rong in this prog that the error is saying no break point tha

Re: [Tutor] can any one help

2010-01-30 Thread Shashwat Anand
I got the question. I just gave you hints, so as you can try yourself. Also please use 'Reply all' On Sun, Jan 31, 2010 at 4:08 AM, invincible patriot < invincible_patr...@hotmail.com> wrote: > I want to use WHILE LOOP in the first one and in the second question we > need to take a string 'fooba

Re: [Tutor] Problem creating a search

2010-01-30 Thread Shashwat Anand
On Sun, Jan 31, 2010 at 3:47 AM, jim serson wrote: > Hi I am pretty new to python and programming in general. I am trying to > create a search that takes a user input for a file location and user input > to find a group of numbers or a phrase in that file count how many times it > appears then d

Re: [Tutor] can any one help

2010-01-30 Thread Shashwat Anand
Tips: 1. range can be stepped down in reverse order ex -> >>> range(10, 1, -2) [10, 8, 6, 4, 2] 2. you can directly get chars of string. ex -> >>> [i for i in 'foobar'] ['f', 'o', 'o', 'b', 'a', 'r'] also >>> 2 * 'f' 'ff' On Sun, Jan 31, 2010 at 3:56 AM, Shashwat Anand wrote: > seems like home

Re: [Tutor] can any one help

2010-01-30 Thread Shashwat Anand
seems like homework ;) Can you paste your approach here ? On Sun, Jan 31, 2010 at 3:03 AM, invincible patriot < invincible_patr...@hotmail.com> wrote: > > hi > i am stuck in few tasks can some one help me in that > here are first few tasks > > 1 > how can i print the following series, using a loo

[Tutor] Problem creating a search

2010-01-30 Thread jim serson
Hi I am pretty new to python and programming in general. I am trying to create a search that takes a user input for a file location and user input to find a group of numbers or a phrase in that file count how many times it appears then display it. I have gone through a tutorials and searched I/

[Tutor] can any one help

2010-01-30 Thread invincible patriot
hii am stuck in few tasks can some one help me in thathere are first few tasks 1how can i print the following series, using a loop151311...31-12Write a small Python program that generates the list of all pairs of characters c andits doubling 2  c, where c moves through all the letters

Re: [Tutor] Future of Python Programmers

2010-01-30 Thread Wayne Werner
On Sat, Jan 30, 2010 at 1:15 PM, nikunj badjatya wrote: > > Dear all PyPers, > . > I have one important question to ask to all of you, > I am a fresher, recently completed my graduation, had started working on > python 2 months back..!! and I just fell in love with the language. I want > to learn

[Tutor] Future of Python Programmers

2010-01-30 Thread nikunj badjatya
Dear all PyPers, . I have one important question to ask to all of you, I am a fresher, recently completed my graduation, had started working on python 2 months back..!! and I just fell in love with the language. I want to learn more about it. The only concern is there arent enough companies which w

Re: [Tutor] [OT] Python Study Group

2010-01-30 Thread Eri Mendz
You have no choice Wesley, after all this is your book haha. I have joined in since i have your book 2nd edition. I even have your livelessons CD, i thought i get it as well to complement the thick 2nd ed. book. Looking forward to meet you all soon. -- Best Regards Jonathan Swift - "May you li

Re: [Tutor] hash value input

2010-01-30 Thread Kent Johnson
On Sat, Jan 30, 2010 at 4:56 AM, spir wrote: > I'm surprised of this, for this should create as many indexes (in the > underlying array actually holding the values) as there are integer keys. With > possibly huge holes in the array. Actually, there will certainly be a > predefined number of in

Re: [Tutor] hash value input

2010-01-30 Thread Dave Angel
spir wrote: On Fri, 29 Jan 2010 08:23:37 -0800 Emile van Sebille wrote: So, how does python do this? Start here... http://effbot.org/zone/python-hash.htm Great, thank you! From the above pointed page: For ordinary integers, the hash value is simply the integer itself

Re: [Tutor] hash value input

2010-01-30 Thread spir
On Fri, 29 Jan 2010 08:23:37 -0800 Emile van Sebille wrote: > > So, how does python do this? > > > > Start here... > > http://effbot.org/zone/python-hash.htm Great, thank you! From the above pointed page: === For ordinary integers, the hash value is simply the integer itself (unless it’