Using a Python panel
You will see Python panels in demonstrations and use Python panels in exercises. From the menu, you can access a Python panel at any time, either to write your own code or to load in one of the programs developed in the course - use the module number as a filter and, optionally, the step number.
Each panel as an upper code box, where a program is interested, and a lower box, used for interaction.
There are several features designed to make this progress easier:
-
syntax highlighting is used to show the uses of various special words in Python
-
when a close parenthesis is entered, a little box appears to show the matching open parenthesis
-
light lines to show different levels of indentation
When you press the buttons below the panel, here is what to expect:
-
Use the Run button to see the result of your program, which will appear in the lower box.
-
Use the Stop button to stop a program from running.
-
Use the Restore button to restore a code box to the original contents in an exercise. Warning: clicking this button will cause you to lose any changes you have made.