How to Write Code for CPU Programming
- 1). Click "Start" and open Internet Explorer. Input "Python.org" in your browser and select "Download" from the tabs on the left side. Choose "Python Windows Installer" from the list and download and install it to your computer.
- 2). Click "Start," select "All Programs" and search for "Python." Open the Python GUI nick-named "Idle."
- 3). Select "File" and click "New Window." Input your code within this window. For example,
>>> the_world_is_flat = 1
>>> if the_world_is_flat:
... print "Be careful not to fall off!"
...
Be careful not to fall off! - 4). Comment your code as you go along, especially if you will have to return to it later. For example, write simplified comments that help you understand your code such as "max_lives_10."
- 5). Save the code and click on "Run" followed by "Run Module" to see your code in action.
Source...