This is an old revision of the document!


Getting Started with Glowscript

The following is an introduction to using GlowScript, a free online programming environment based on VPython.

Try signing into an account and then selecting your empty list of programs. Click “Create New Program” and name your program to open the code editor.

Once logged in, the Help button in the upper right hand corner of the screen contains a useful introduction along with tutorials and extensive descriptions for more details than what is presented here.

Writing and Running a Program

Try writing the following line of code below the Glowscript header in line 1. Do not delete the Glowscript 2.8 VPython header from the top of your Glowscript programs.

print("Hello, World!")

Then, click “Run this program” to compile your code and run the program. If there are no errors or bugs in your code, then the program will successfully run to give you a text output. From the output screen, you may go back to the editor screen by clicking “Edit this program”.

Commenting Lines of Code

It is good practice to comment each line of code you write to remind yourself what it does and why you wrote it. You can comment code by using the pound (#) symbol.

# This is a commented line in Glowscript

It is important that you and others understand each line of code. The comments are meant to externalize that understanding.

  • summer_2019/getting_started.1564459817.txt.gz
  • Last modified: 2019/07/30 04:10
  • by wellerd