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

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
Try a byte of a python or alan gauld site on learning python. Welcome to python. Sent from my BlackBerry wireless device from MTN -Original Message- From: Aisha Ali Sender: tutor-bounces+delegbede=dudupay@python.org Date: Sat, 8 Oct 2011 17:40:38 To: tutor@python.org Reply-To: Ais

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

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