Question: ```
# Given three ints, a b c, print True if b is greater than a,  
# and c is greater than b. However, with the exception that if 
# "bOk" is True, b does not need to be greater than a. 

a = int(input())
b = int(input())
c = int(input())
bOk = bool(input())

print(((bOk and c > b) or (b > a and c > b)))

```

My program works for all combinations besides "3 2 4 False"

I don't understand why it prints True for this combination. The first closed set should return False since bOk = False, and the second closed set should return False as well since b > a is False. 

Explanation would be much appreciated.

Answer: 
Boolean values are the two constant objects False and True. 

For Boolean Strings

```
   bool('')
=> False

   bool('false')
=> True

```

The bool checks whether the list has an object or not. If it is empty it will return False, if anything but empty, it will return True.

In your case, bOk = bool(input()), has a value, therefore **bOk** returns True, regardless of what object it has. And thus the output you have.
Comments and other answers already covered explanation of OPs mistake. I'll rather show how things are usually done in a more restricted context (production?).

Code is not fully tested and is not the most elegant though the point is: sanitize input. Always. And prompt user for choice questions (yes/no, true/false) in a completely different way.

In the below example bool prompt sanitized as "this value is the only value that is treated as True; all other values are False".

```
#!/usr/bin/env python
"""Just an example."""

def input_type(prompt, type_):
    """Prompt a user to input a certain type of data.

    For a sake of simplicity type_ is limited to int and str.

    :param prompt: prompt message to print
    :param type_:  type of a data required

    :type prompt:  str
    :type type_:   int or bool

    :return: data of a required type retrieved from STDIN
    :rtype:  type_
    """
    accepted_types = [int, str]
    if isinstance(prompt, str):
        if any(type_ == atype for atype in accepted_types):
            while True:
                user_input = input(prompt)
                try:
                    return type_(user_input)
                except ValueError:
                    continue
        else:
            errmsg = 'Requested type is unsupported by this function: %s'
            errmsg = errmsg % type_.__name__
    else:
        errmsg = 'Prompt must be a string: got %s instead'
        errmsg = errmsg % type(prompt).__name__

    raise Exception(errmsg)

def input_bool(prompt, as_true):
    """Prompt user to answer positively or negatively.

    :param prompt:  prompt message to print
    :param as_true: value to interpret as True

    :type prompt:  str
    :type as_true: str

    :return: user answer
    :rtype:  bool
    """
    if isinstance(as_true, str):
        return input_type(prompt, str) == as_true
    else:
        errmsg = "'as_true' argument must be a string: got %s instead"
        errmsg = errmsg % type(as_true).__name__

    raise Exception(errmsg)

if __name__ == '__main__':
    a = input_type('Enter first integer: ', int)
    b = input_type('Enter second integer: ', int)
    c = input_type('Enter third integer: ', int)
    bOk = input_bool('Enter boolean value (True/False): ', 'true')

    # Result
    print(((bOk and c > b) or (b > a and c > b)))

```

Hope that helps and sorry for such a huge listing. Processing user input is always a tricky task.