Astronomy Hour of Code

Activity 1: Using Output

Instructions:

Professional astronomers use computer controlled robotic telescopes today for the majority of their observations. These telescopes are controlled by computer software which can take images with little or no human intervention. One network of these computerized telescopes is the Skynet Robotic Telescope Network which offers astronomers the ability to take images at telescopes around the world. Skynet Junior Scholars is an educational program that engages students in activities which use these research-grade robotic telescopes and software tools to learn about astronomy and science. In this Hour of Code, we are going to learn about computer programming and by the end of activity 20 work with a virtual telescope in your browser to search for astronomical objects in a 3D virtual world.

In this first activity, we are going to learn how to output information to the screen. It is a first step toward creating our virtual telescope. The command to do this is called output and whatever we type after that word will be sent to the terminal output window. If you are using a screen reader, the console window will read the text that you output there. For example, if we want the word "telescope" to appear in the output window, we will type:

output "telescope"

in the online code window below and then select the green Run Program button below the editor on the right (second in the tab order).

Exploration Challenge (Optional):

Use the output command to make the computer print the name of our galaxy to the console window.

Next Tutorial

In the next tutorial, we will discuss Astronomy Hour of Code | Activity 0, which describes Accessible astronomy themed Hour of Code.