Re: [Tutor] REport Card Question

2010-11-30 Thread Alan Gauld
"Robert Sjöblom" wrote On a related note, do all functions implicitly contain "return None" in them? All functions return a value because thats the definition of what a function does. (Some languages have a construct known as a procedure which is a function with no return value, but Python do

Re: [Tutor] REport Card Question

2010-11-29 Thread Wayne Werner
On Mon, Nov 29, 2010 at 8:28 PM, Robert Sjöblom wrote: > > > On a related note, do all functions implicitly contain "return None" > in them? Trying out this function (correctly) would get "None" added, > such as: > Enter grade:76 > B, Try Harder > None > > Is there a way to avoid "return None" wi

Re: [Tutor] REport Card Question

2010-11-29 Thread Robert Sjöblom
>>  Write a code that will take an input from a user (numerical grade) and >> convert their numerical grade into a letter grade that is accompanied by a >> ?smart? statement. >> >>  def grade_score(grade): >> >>     if grade >=95 and grade <= 100: >> >>         print 'A+, Excellent' >> >>     elif

Re: [Tutor] REport Card Question

2010-11-28 Thread Wayne Werner
On Sun, Nov 28, 2010 at 6:50 PM, Andre Jeyarajan wrote: > Write a code that will take an input from a user (numerical grade) and > convert their numerical grade into a letter grade that is accompanied by a > “smart” statement. > > def grade_score(grade): > > if grade >=95 and grade <= 100: >

[Tutor] REport Card Question

2010-11-28 Thread Andre Jeyarajan
Write a code that will take an input from a user (numerical grade) and convert their numerical grade into a letter grade that is accompanied by a “smart” statement. def grade_score(grade):     if grade >=95 and grade <= 100:          print 'A+, Excellent'      elif grade >=85 and grade < 95: