I am very new to Ubuntu. If I use IDLE I am using Python 3.3.2+, whereas if I go the terminal and type python --version it says I am using 2.7.5+. As these versions are not compatible with each other, I can not run code created in IDLE from the Terminal. So how do I make sure that I am only using one version of python in ubuntu.
Python 3 has introduced a number of backwards incompatible changes. That is why your python 3 code does not run without error when using the python command. To answer your question "how do I make sure that I am only using one version of python in ubuntu", you should note that the two python versions live in peaceful cohabitation. They can coexist. In a terminal just use the command
In response to Rahil's comment on why Ubuntu ships with two python versions: