Made display() and user_input() functions python version-aware.