Re: [Tutor] Help with elif

2009-01-18 Thread Alan Gauld
"Alan Gauld" wrote If you already know Java, even a little bit then my tutorial will be too basic for you. I'd try the Byte of Python website/book. Actually I meant the dive into python website/book. Not that there's anything wrong with "Byte of" either, but "Dive In" seems more appropria

Re: [Tutor] Help with elif

2009-01-18 Thread Kent Johnson
On Sat, Jan 17, 2009 at 10:21 PM, Ian Egland wrote: > In regards to learning python, I've found that after I get somewhat-familiar > with a language, I want a programming problem to solve with what I've > learned. While learning Java, http://www.javabat.com has been my best > friend. (That is, as

Re: [Tutor] Help with elif

2009-01-18 Thread Alan Gauld
"Ian Egland" wrote learned. While learning Java, http://www.javabat.com has been my best friend. (That is, as close to a best friend as programming website can be.) Is there something like this for Java? Is one in the works? If you already know Java, even a little bit then my tutorial will

Re: [Tutor] Help with elif

2009-01-17 Thread Kent Johnson
On Sat, Jan 17, 2009 at 10:21 PM, Ian Egland wrote: > I have looked at a couple tutorials and whipped this up. However, attempting > to run it in IDLE results in a syntax error leaving my elif highlighted in > red. What's wrong? I've looked at the code and can't find any syntax errors- > though I'

[Tutor] Help with elif

2009-01-17 Thread Ian Egland
Wow, that was a quick response! Thanks all! I have looked at a couple tutorials and whipped this up. However, attempting to run it in IDLE results in a syntax error leaving my elif highlighted in red. What's wrong? I've looked at the code and can't find any syntax errors- though I've just started.

Re: [Tutor] help with elif statements

2005-10-13 Thread Alan Gauld
> below is my code and everytime I input a value of 16 or more it keeps > returning sophomore. could anyone help me figure out what to change so > that it won't return sophmore for things greater than or equal to 16? This is one of the gotchas of if/elif chains and I discuss it in my branching to

Re: [Tutor] help with elif statements

2005-10-12 Thread bob
At 06:04 PM 10/12/2005, [EMAIL PROTECTED] wrote: >hello > >below is my code and everytime I input a value of 16 or more it keeps >returning sophomore. could anyone help me figure out what to change so >that it won't return sophmore for things greater than or equal to 16? > >def getcredits(num): >

Re: [Tutor] help with elif statements

2005-10-12 Thread Danny Yoo
On Wed, 12 Oct 2005 [EMAIL PROTECTED] wrote: > below is my code and everytime I input a value of 16 or more it keeps > returning sophomore. could anyone help me figure out what to change so > that it won't return sophmore for things greater than or equal to 16? If we have the following: ### Ps

Re: [Tutor] help with elif statements

2005-10-12 Thread Hans Dushanthakumar
IL PROTECTED] Sent: Thursday, 13 October 2005 2:05 p.m. To: tutor@python.org Subject: [Tutor] help with elif statements hello below is my code and everytime I input a value of 16 or more it keeps returning sophomore. could anyone help me figure out what to change so that it won't ret

Re: [Tutor] help with elif statements

2005-10-12 Thread John Fouhy
On 13/10/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > below is my code and everytime I input a value of 16 or more it keeps > returning sophomore. could anyone help me figure out what to change so > that it won't return sophmore for things greater than or equal to 16? Which is the first bran

[Tutor] help with elif statements

2005-10-12 Thread andrade1
hello below is my code and everytime I input a value of 16 or more it keeps returning sophomore. could anyone help me figure out what to change so that it won't return sophmore for things greater than or equal to 16? def getcredits(num): if num < 7: return 'Freshman' elif num >= 7