Basics of using the JES Window
The top part is the program area. This where you write your recipes: The programs and their names that you’re creating. This area is simply a text editor—think of it as Microsoft Word for your programs. The computer doesn’t actually try to interpret the names that you type up in the program area until you press the Load, and you can’t press the Load button until you’ve saved your program
The bottom part is the command area. This is where you command the computer to do something. You type your commands at the >>> prompt, and when you hit return, the computer will interpret your words (i.e., apply the meanings and encodings of the Python programming language) and do what you have told it to do. This interpretation will include whatever you typed and loaded from the program area as well.
![]() |
|
Print Command
Try typing
into the command area, then press Enter Jython will do the calculation and then output the result. |
![]() |
Try each of these:
- print 23.1/45.5
- print 26*75
- print "26*75"
- print "Hello"
- print "Hello "+"your name here"
![]() |
|
Variables
You can use variables to store information to reuse later. Think of a variable as a container for information. What is in the variable can change, but the name of the variable stays the same.
![]() |
|
![]() |
|
Using the Program Area
I can write a 'recipe' for a function in the program area, then reuse it later. To define (or name) a 'recipe' you use def followed by three things:
- The name of the recipe (function)
- Any inputs to it in parenthesis (or leave empty parentheses)
- A colon :
Here is an example:
In the program (top) area, type the following
| def myDetails(): myName = "Mary" myAge = "21" print "My name is " + myName print "My age is " + myAge |
![]() |
|
In the command window of JES, you can now type myDetails() and your program will run.






