Ok so I have downloaded the latest version of python. How do I run the programs like the lecturer is doing?
You can either download IDLE or you can use your terminal. To run in your terminal just use "python file.py" once your in the correct directory
On Windows, you have a couple choices for installing Python. ActiveState makes a Windows installer for Python called ActivePython, which includes a complete version of Python, an IDE with a Python-aware code editor, plus some Windows extensions for Python that allow complete access to Windows-specific services, APIs, and the Windows Registry. ActivePython is freely downloadable, although it is not open source. It is the IDE I used to learn Python, and I recommend you try it unless you have a specific reason not to. One such reason might be that ActiveState is generally several months behind in updating their ActivePython installer when new version of Python are released. If you absolutely need the latest version of Python and ActivePython is still a version behind as you read this, you'll want to use the second option for installing Python on Windows. The second option is the “official” Python installer, distributed by the people who develop Python itself. It is freely downloadable and open source, and it is always current with the latest version of Python. Download the latest Python Windows installer by going to http://www.python.org/ftp/python/ and selecting the highest version number listed, then downloading the .exe installer. Double-click the installer, Python-2.xxx.yyy.exe. The name will depend on the version of Python available when you read this. Step through the installer program. If disk space is tight, you can deselect the HTMLHelp file, the utility scripts (Tools/), and/or the test suite (Lib/test/). If you do not have administrative rights on your machine, you can select Advanced Options, then choose Non-Admin Install. This just affects where Registry entries and Start menu shortcuts are created. After the installation is complete, close the installer and select Start->Programs->Python 2.3->IDLE (Python GUI). You'll see something like the following: Python 2.3.2 (#49, Oct 2 2003, 20:02:00) [MSC v.1200 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. **************************************************************** Personal firewall software may warn about the connection IDLE makes to its subprocess using this computer's internal loopback interface. This connection is not visible on any external interface and no data is sent to or received from the Internet. **************************************************************** IDLE 1.0
I have downloaded .py 2.7 from python.org when I go to start --> python 2.7 --> IDLE (Pythong GUI) I type this in: x = 3 # Create variable x and assign value 3 to it x = x * x # Bind x to value 9 print x n = raw_input('Enter a number:') print n # print n/n How do I make this run (execute) like the professor is doing at the 27.00 minute mark in the following video: http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-introduction-to-computer-science-and-programming-fall-2008/video-lectures/lecture-2/
I have downloaded .py 2.7 from python.org when I go to start --> python 2.7 --> IDLE (Pythong GUI) I type this in: x = 3 # Create variable x and assign value 3 to it x = x * x # Bind x to value 9 print x n = raw_input('Enter a number:') print n # print n/n How do I make this run (execute) like the professor is doing at the 27.00 minute mark in the following video: http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-introduction-to-computer-science-and-programming-fall-2008/video-lectures/lecture-2/
You can go to file "new window" That will bring up a text editor where you can write your code. Then save and hit F5.
Join our real-time social learning platform and learn together with your friends!