Re: [Tutor] Fwd: Puzzle - Next Step to our interviewing process - Pramati Technologies!

2014-04-15 Thread Ben Finney
Sunil Tech writes: > I need the python program This is a resource for tutoring, not for others to write your program. Please approach this as an opportunity to do the work yourself *while* learning. It's still you that needs to write the program. -- \ “If I held you any closer I would be

Re: [Tutor] Fwd: Puzzle - Next Step to our interviewing process - Pramati Technologies!

2014-04-15 Thread Walter Prins
Hi, On 15 April 2014 15:49, Sunil Tech wrote: > Hi Danny, > > > Thank you for replying.. > > I need the python program which takes the attached csv & on running the > program which will give me the results as That is still not a question. It's a requirements statement. I felt tempted to point

Re: [Tutor] Fwd: Puzzle - Next Step to our interviewing process - Pramati Technologies!

2014-04-15 Thread Sunil Tech
Hi Danny, Thank you for replying.. I need the python program which takes the attached csv & on running the program which will give me the results as Data File data.csv 1, 4.00, burger 1, 8.00, tofu_log 2, 5.00, burger 2, 6.50, tofu_log Program Input program data.

Re: [Tutor] Fwd: Puzzle - Next Step to our interviewing process - Pramati Technologies!

2014-04-15 Thread Danny Yoo
So, what is your question? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] questions when define a class

2014-04-15 Thread Peter Otten
Qianyun Guo wrote: > Hi all, I am trying to get a suffix tree from a string. I use three > classes, Node, Edge, SuffixTree. I have two questions when implementing: > > 【1】 > a = Edge(1,2,3,4) > a.length > > 1 > if I remove '@property' in my code, it returns as below: > a = Edg

[Tutor] questions when define a class

2014-04-15 Thread Qianyun Guo
Hi all, I am trying to get a suffix tree from a string. I use three classes, Node, Edge, SuffixTree. I have two questions when implementing: 【1】 >>> a = Edge(1,2,3,4) >>> a.length 1 if I remove '@property' in my code, it returns as below: >>> a = Edge(1,2,3,4) >>> a.length >>> a.length()

Re: [Tutor] Quick Question

2014-04-15 Thread Steven D'Aprano
Hi Victoria, On Tue, Apr 15, 2014 at 12:06:13AM -0500, Victoria Kuritza wrote: > How can I search in a corpus for three or more occurrences of > capitalized words in a line? What would I input as my search? I'm afraid that question is a bit *too* quick. What are you using for search? My guess

Re: [Tutor] reading a csv file

2014-04-15 Thread Sunil Tech
yes Alan, what you said is true. Thank you. On Tue, Apr 15, 2014 at 1:40 PM, Alan Gauld wrote: > On 15/04/14 07:06, Sunil Tech wrote: > >> Hi, >> >> #!/usr/bin/python >> >> import csv >> import sys >> >> def main(): >> cr = csv.reader(open("data.csv","rb")) >> for row in cr: >>

Re: [Tutor] Quick Question

2014-04-15 Thread Mark Lawrence
On 15/04/2014 06:06, Victoria Kuritza wrote: How can I search in a corpus for three or more occurrences of capitalized words in a line? What would I input as my search? Cheers, Victoria K. What does your code currently look like? What problems are you actually having? Last and by no mean

[Tutor] Quick Question

2014-04-15 Thread Victoria Kuritza
How can I search in a corpus for three or more occurrences of capitalized words in a line? What would I input as my search? Cheers, Victoria K. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mai

Re: [Tutor] Python & algorithms (Lang line simplification algorithm)

2014-04-15 Thread Laura Kauria
Okay I'll try. What the main job is to do an algorithm which simples a line. Algorithm deletes points which are unnecessary accurate according to tolerance distance user gives. >> I started by converting the pseudocode I had to python. Pseudocode: http://web.cs.sunyit.edu/~poissad/projects/Curve/

Re: [Tutor] reading a csv file

2014-04-15 Thread Alan Gauld
On 15/04/14 07:06, Sunil Tech wrote: Hi, #!/usr/bin/python import csv import sys def main(): cr = csv.reader(open("data.csv","rb")) for row in cr: print row when i run this... cr = csv.reader(open("data.csv","rb")) AttributeError: 'module' object has no attribute 'r