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