Re: [Tutor] python coding problem

2016-09-26 Thread Ben Finney
Alex Hall writes: > On Mon, Sep 26, 2016 at 11:35 AM, Richard Koeman > wrote: > > > def maximum(n1, n2): > > print "the first number is" ,n1 > > print "the second number is", n2 > > if n1 > n2: > > return > > Using the 'return' keyword will return whatever follows it (nothing, in > thi

Re: [Tutor] python coding problem

2016-09-26 Thread Ramanathan Muthaiah
> > This is my first time using this so I hope it works. > I am trying to find out why this code doesnt work. > Its simple. I want to find out which number is bigger. > Welcome! > > I hope you can help and that I am using this python feature properly. > Thanks. > The function prints the first t

Re: [Tutor] python coding problem

2016-09-26 Thread Alex Hall
On Mon, Sep 26, 2016 at 11:35 AM, Richard Koeman wrote: > This is my first time using this so I hope it works. > I am trying to find out why this code doesnt work. > Its simple. I want to find out which number is bigger. > > I hope you can help and that I am using this python feature properly. >

Re: [Tutor] python coding problem

2016-09-26 Thread Alan Gauld via Tutor
On 26/09/16 16:35, Richard Koeman wrote: > The function prints the first two print statements then nothing else > happens. > > def maximum(n1, n2): > print "the first number is" ,n1 > print "the second number is", n2 We know this works so far, so that's fine. > if n1 > n2: > return B

Re: [Tutor] python coding problem

2016-09-26 Thread Danny Yoo
Hi Richard, The "return" statement does an early escape out of the currently running function. You have a "return" statement in your program that looks unintentional. In an ideal world, the Python compiler would give a warning about this because it's a common mistake. Unfortunately it looks lik

[Tutor] python coding problem

2016-09-26 Thread Richard Koeman
This is my first time using this so I hope it works. I am trying to find out why this code doesnt work. Its simple. I want to find out which number is bigger. I hope you can help and that I am using this python feature properly. Thanks. The function prints the first two print statements then noth

Re: [Tutor] Python coding help

2011-10-09 Thread bob gailer
On 10/8/2011 8:40 PM, Aisha Ali wrote: Hi, My computer science teacher provided optional Python exercises for us as we're learning about Java/Python right now. I decided to learn how to code these because I'm very interested in programming, but I don't know how to start on the problems in thi

Re: [Tutor] Python coding help

2011-10-09 Thread Alan Gauld
On 09/10/11 01:40, Aisha Ali wrote: My computer science teacher provided optional Python exercises for us as we're learning about Java/Python right now. I decided to learn how to code these because I'm very interested in programming, but I don't know how to start on the problems in this case. He

Re: [Tutor] Python coding help

2011-10-09 Thread delegbede
: Aisha Ali Subject: [Tutor] Python coding help ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor

[Tutor] Python coding help

2011-10-09 Thread Aisha Ali
Hi, My computer science teacher provided optional Python exercises for us as we're learning about Java/Python right now. I decided to learn how to code these because I'm very interested in programming, but I don't know how to start on the problems in this case. Help? I'll love to learn more abo

Re: [Tutor] python coding using regular expression

2006-12-21 Thread Kent Johnson
sg wrote: > hi > i am new to python. i want help in regular expression.. anyone explain > or guide me for following problem.. > > the content of txt file is splitted using the pipe | symbol and sorted . > then the field in the first row is compared with field in the second row and > the s

Re: [Tutor] python coding using regular expression

2006-12-21 Thread Luke Paireepinart
sg wrote: > hi > i am new to python. i want help in regular expression.. anyone explain > or guide me for following problem.. > > the content of txt file is splitted using the pipe | symbol and sorted . > then the field in the first row is compared with field in the second row and > the se

[Tutor] python coding using regular expression

2006-12-21 Thread sg
hi i am new to python. i want help in regular expression.. anyone explain or guide me for following problem.. the content of txt file is splitted using the pipe | symbol and sorted . then the field in the first row is compared with field in the second row and the second row field is comp

Re: [Tutor] Python coding

2005-09-12 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > I am working on a project that we have built a C Text interface previously. We > want to be able to move this to a graphical interface, and after some > studying, > we decided to use a python-based interface. We want to use as much of the old > code as possible, so we ha

Re: [Tutor] Python coding

2005-09-12 Thread Eric Walker
I think there is some software out there call SWIG that will create an interface to your C code within python... On Monday 12 September 2005 01:59 pm, [EMAIL PROTECTED] wrote: > I am working on a project that we have built a C Text interface previously. > We want to be able to move this to a gr

[Tutor] Python coding

2005-09-12 Thread tuvas
I am working on a project that we have built a C Text interface previously. We want to be able to move this to a graphical interface, and after some studying, we decided to use a python-based interface. We want to use as much of the old code as possible, so we have decided to try an interface with