I made a very basic calculator and it doesn't run. I think the "def" thing is a issue : I made a very basic calculator in Python 2.7. The thing worked fine before I thought of making it loop so that it doesn't exit automatically.

I created this ----> http://pastebin.com/suUSfLgs

the original code without def ---> http://pastebin.com/83AtPMKB

What am I doing wrong with the def things? Sorry I am new to Python.