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

Friday, October 11, 2013

#LearnStreet: Teacher's Preview Assignment Lesson 7 Sample Solution


def check_interval():
    #Your code here
    if num >= 1 & num <=5:
        return "1-5"
    elif num >= 6 & num <=10:
        return "6-10"
    elif num >= 11 & num <=15:
        return "11-15"
    elif num >= 16 & num <=20:
        return "16-20"  
    else:
        return "not in between 1-20"

#This is just for you to see what happens when the function is called
print check_interval()

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts