Quotes help make search much faster. Example: "Practice Makes Perfect"

Saturday, December 8, 2012

LearnStreet Python Lesson 4 Exercise 7



#solution given by LearnStreet  which contains an error in my opinion unless num is a global variable
#had a tough time with this since I started with def check_interval(num):
def check_interval():
     if num <=5:
        return "1-5"
     elif num <=10:
         return "6-10"
     elif num <= 15:
         return "11-15"
     else:
         return "16-20"

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts