a= raw_input("input a number") 
def the_flying_circus():   
    if a<3 and a>0:
        return True
    elif a>=3:
        return False
        return False

when i enter 2 it keeps saying that the_flying_circus() was returned False

Replace this line with your code.


raw_input doesn't store the result as a integer, which means the comparison done isn't good, try casting a to a integer:

a= int(raw_input("input a number") )


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.