Function to check number of trailing zeros in multiple of 2
def returnTwos ( val ) : NEW_LINE INDENT count = 0 NEW_LINE while ( val % 2 == 0 and val != 0 ) : NEW_LINE INDENT val = val // 2 NEW_LINE count += 1 NEW_LINE DEDENT return count NEW_LINE DEDENT