You need to use a Windows command line prompt. Start one up, and then enter (> is the prompt, don't type it):
> python myprog.py
where myprog.py is the name of the Python script you want to run. If you get a message like:
'python' is not recognized as an internal or external command
you need to add the Python install directory to your PATH variable.
If you want a Python IDE, where you can run everyting from a GUI environment, take a look at Pyscripter.
All of your statements are missing closing parens:
x1 = float(input("Enter first x-coordinate: ") y1 = float(input("Enter first y-coordinate: ")
should be:
x1 = float(input("Enter first x-coordinate: ")) y1 = float(input("Enter first y-coordinate: "))
Try using an IDE that does paren matching, like http://code.google.com/p/pyscripter/
Assuming you have the latest version, Tools > Options > IDE Options > Code Completion should have what you need - add what you want to the Special Packages list for imported modules that might not show up otherwise.
For Vim mode, have a look here under Shortcuts, there's a Vim .ini file you can import through Tools > Options > Import/Export > Import Shortcuts.
Hope this helps.
You don't say what platform you are on, so it's hard to give advice. I would start with Python 2.7, because there are more tutorial materials and libraries available for it. If you want an IDE, and are on Windows, I recommend PyScripter.
> are there other pieces of software that you might recommend for working with python?
I really like the PyScripter IDE for Python programming. For libraries - it depends what you want to do. I've used wxPython a bit and quite like it for creating GUIs.
I'm pleased with PyCharm. However, I stumbled upon PyScripter a few weeks ago and it appears to be a solid, free, Python IDE. If you have a comfort level with Windows you'll like it. It has a VB/Office type of setup/theme to it. It's free as well.
Additionally, I would say try all of the different editors that are being recommended and settle on the one that works best for you.
It might be worth a go to get the basic syntax of Python down, while still in a friendly environment. You might also look at: PyScripter, I've never used it, but I've heard good things about it.
I'm personally a C# developer, but I learned Python to write Boxee plugins. I'd say it took about a month or so to really grasp the language/library. The only thing I could say that I dislike about Python is the class syntax. (and whitespace)
PyScripter. I use windows as my main OS, so that's what i script on. it's nice a featured, and if you hover over variables/objects, it tells you information about them.
> What "application" do you use to code Python and Java applications in? Are they free?
Everything is free nowadays, unless you want some piece of "enterprise" bloatware. You can code both Java and Python using just a command-line shell and a text editor, or you can use an IDE (Integrated Development Environment). The (free) IDE I use for Java is IntelliJ IDEA, and the (free) one I use for Python is PyScripter.
If you are on Windows, PyScripter is a great environment. If you don't want an IDE, then Notepad++ is a fairly good text editor, but vim and emacs are more powerful.
I just wısh he could do a 64 bıt versıon. Apparently he's been working on one if you check the Issues list, and it was supposed to be out by the end of this year. He needed $800 for 64 bit Delphi.
I am finishing LPTHW right now, and I had the same problem with finding a free IDE that didn't get in the way of coding and testing small snippets of code.
In the Khan Academy python videos, Salman uses Pyscripter. I've never used it, but it looks delightfully straightfoward. Windows only.
On my Mac, I finally settled on Aptana Studio 3 (free) after trying 5 or 6 other IDEs. It's available for Mac, Windows and Linux.
I found it was easy for me to switch between Ruby and Python with the Aptana setup. I started Learn Ruby the Hard Way when I was halfway through LPTHW. It's been great reinforcement.
PM me if you have any questions. Sometimes shared context helps.
Geany is pretty okay. On Linux currently I mostly use vim myself.
I recently found Spyder which I'm really looking forward to trying out, but haven't yet.
If you're on Windows, IMO there's no substitude for PyScripter and I kinda wish there was something like that under Linux.
When I tried Eclipse + Pydev it was all acting strange and not working properly. It's probably great if you're already using eclipse, but I didn't have the time to invest to get it to work.