1C

C) Quorum Computer Language (1)
para0: >
In this part, a programming language called Quorum will be introduced. We will eventually give commands through Quorum to instruct a telescope to take images.

*NOTE: Quorum commands are introduced and available for copying and pasting into a Quorum computing box. These commands are highlighted in red (it may look orange to you). A link (below) to a text file of the Quorum commands is available as a PDF (it is also in the resources). It will be at the beginning of each Part that contains Quorum commands.

Videos are provided to help with the understanding of the material. In the videos, Tyler, an asteroid astronomer, has hired a research assistance, Chris. Tyler’s goal for Chris is to be able to produce light curves for asteroids. These light curves help astronomers determine the composition and size of asteroids. In this first section, Chris’s goal is to have a computer instruct a telescope to take an image. This will require learning something about coding. Let’s meet Chris in this 1:10 video. He is excited to get started and take you on this journey!

************************************************************************

Quorum is an accessible programming language we can use to help operate telescopes and analyze the data they capture. It was created by a team of computer scientists at the University of Nevada Las Vegas. Listen as these scientists describe Quorum and discover why it was chosen for the IDATA project. The video will open in a new tab and is 3:48 seconds long.

***********************************************************************

For the rest of this part, you will need to have a Quorum Box open to type the Quorum commands into. You may scroll down and use the Quorum Box on this page, or, the link below will open a Quorum Box in a new tab. You can either use ctrl tab# to switch between this tab (the instructions) and the Quorum Box, or you can arrange the two windows side by side. Your vision level will determine what is best for you. Further down this page, Chris will explain, in a video, how to use the Quorum Box.

A) COMMANDS: say, output

Chris needs to give instructions to the computer. He usual works in the dimly lit (not to mention cold) telescope dome. It will be more efficient for him to find a way to send instructions that do not require vision. Chris and others with low vision might use a screen reader to read the text and other items on the screen. A screen reader acts as a set of eyes, reading text, links, and describing how an item is laid out, such as a web page. For Chris, the screen reader allows him to access his code in the same way those with vision can. Like a screen reader, we can make Quorum read something out loud. Listen to Chris as he talks about computing and the first two Quorum commands in this 3:39 video.

*****************************************************************************

1. say

Using your open Quorum Box, type the word, say, in lower case letters, followed by what you want to be read in quotation marks. It may be helpful to read the Notes below on some of the features of the Quorum Box before trying the “say” command. Or you can listen to Chris in the following 3:04 video:

**Note1: All Quorum commands will be typed in large Quorum boxes. There is a Quorum Box on each page in this part that you can scroll down to use instead of opening another tab if you find that easier. By default, the Quorum boxes are set up to work well with screen readers. Sighted and low vision programmers may find it easier to code if the screen reader mode is turned off (there is a checkbox on the upper left corner of each Quorum box). When the “screen reader mode” checkbox is unselected, features such as line numbering, auto-indenting, and colored text highlighting appear. If you find these features helpful, use them.

**Note2: There are several buttons at the bottom of each Quorum box. The “BUILD” button checks for errors in your code. Mistakes are reported in the box immediately below the “BUILD” button along with some hints about what might be wrong. Just keep trying until you see the words “Build Successful.” Then you can click the “RUN” button to run your code. A new tab opens each time you click the “RUN” button. To close the tab when you are finished looking at the result after you clicked the “RUN” button, simply hit control F4, or click the x in the upper right corner of that tab.

Now you are ready to try using the “say” command with any statement you would like to hear the computer say. Either use the Quorum Box you opened in another tab, or use the Box below. (If you are using a Chrome browser, you may not “hear” the command – you may have to use a different browser.)

***************************************************************************
QUORUM BOX

***************************************************************************

2. output

For those of you with vision who would like to see words, use the command “output” to instruct the computer to display any words you type inside the quotation marks. You can return to your Quorum box to try the output command. Remember, the results appear in a new tab every time you click the “RUN” button. Printed text will appear in a box in this new tab called the Console Output. This box remains empty for spoken commands.

When you finish, close the tab either by clicking the X or using the key control F4.

*NOTE: The “RESET” button, found to the right of the BUILD, RUN and SAVE buttons, clears the Quorum Box. The code will automatically save if you navigate away from the page, but only if you have hit the BUILD or RUN button. The “SAVE” button is useful when you are working on the code and have not used BUILD or RUN yet.

By the way, the commands in Section 1 are not capitalized (Section 2 and Matrices do use some capitalization) . So if you get an error in the Console Output box, it may be you capitalized a command.

3. CHALLENGE

Have the computer output and say the names of the four planets closest to the Sun. Use your same Quorum Box.

**************************************************************************

B) DATA TYPES and VARIABLES

Computers were basically invented to organize and manipulate data. And there is a huge amount of data in the world!

In the following video, Chris meets with Tyler. Tyler explains some of the science he does concerning asteroids. He also helps Chris understand the idea of variable types in the Quorum progamming language. The video length is 7:21:

*********************************************************************

To summarize:

A Variable is simply DATA that CAN CHANGE. Variables are defined by programmers when writing code.

– Different types of data can be stored in different types of VARIABLES.

To learn about the different types of variables that QUORUM uses to represent data, it is helpful to do the following activities:

1. ACTIVITY #1: Variables — Go Code: Go Fish, programming style!

Before you start the game, lets look at the Quorum COMMANDS for the different types of variables. The game itself will teach you the difference between each of them, and how to use them.

There are four types of variables in Quorum, so four different COMMANDS: text, integer, number, and boolean.

a) The command is typed, followed by the name you choose to give to the variable, followed by an equal sign.

b) To the right of the equal sign, type the value being assigned to the variable. In this Example (highlighted below), the variable type is text, the variable name is name, and the value being assigned is the word “Quorum”:

text name = “Quorum”

**NOTE: For text variables, the value MUST be in quotation marks.

The game below will help you distinguish between the four types of variables and their commands.

TEACHERS: the instructions and resources are found at the following links:

The VIDEO below provides instructions for Go Code to both the teachers and students. Use what is needed.

STUDENTS: As you are doing the Go Fish activity, use the JOURNAL BOX below to record the variables you defined. You will be using these variables in the next activities. Try to have 2 or 3 text, integer, and number variables.

**************************************************

JOURNAL BOX

*************************************************

2. ACTIVITY #2: Variables in Quorum

The goal of this activity is to see if you can combine the variables you created in the Go Fish activity in some interesting way using a plus or minus sign.

a) In your Quorum Box (you can use the one that you opened previously, or there is another below for your convenience), paste or type in the variables you saved in the above JOURNAL BOX.

b) Next, you will use the output or say commands with additional text and a “+” or “-” sign to see if you can create a new string that makes sense.

c) These NOTES may help you:

1. Text and text variables can be put together with a + sign. This is called making a “string”.

2. Recall that any text must be in quotes.

3. If you want to add or subtract numbers or integers within your output string, put them in parentheses. Example:

output (number variable 1 + number variable 2)

4. Boolean variables – notes:

a) A boolean can only have two possible values, true or false.

b) You can define text to be a boolean: boolean on = true, or boolean off = false

c) Or you can use the boolean to compare different numbers or integer values like this example below:

integer a = 5

integer b = 6

boolean answer = a > b

output answer

This outputs the variable called answer, which is defined as a boolean. Since it is defined as a boolean, it can only output the word true or false. And of course, Quorum knows if the integer variable a is greater than the variable b because it checks the integers assigned.

Now you are ready to do this activity (Activity #2). Recall, you should use the variables you saved in your Journal Box above. String them together in a creative way and then use an output or say command. Use the link below for a new Quorum Box or use one you have already open.

**********************************************************

QUORUM BOX FOR ACTIVITY #2

**********************************************************

Once you have a working output or say statement using the variables you defined in the Go Fish game, answer these questions in the same JOURNAL BOX you used above:

a. Describe at least one mistake you made before getting your statement to work.

b. What did you learn about combining variables?

3. ACTIVITY #3: Challenge!

It’s time to put what you’ve learned to the test! Use the following resource to try the challenge.

***********************************************************

C) RULES and OPERATIONS for VARIABLES

In the previous part, you experimented with combining variables using plus and minus signs.

– In your experimenting, what did you discover about combining text variables?

The other variable types (integer, number, or boolean) also have different rules about how they can be handled when you try to put them together. The next few exercises will introduce you to these rules.

If you would like to listen to Chris’s explanation, click on the 7:45 video below. Chris also reviews the four variable types.

4. ACTIVITY #4 – QUORUM EXERCISE (Operations- part 1)

Use a Quorum Box you already have open.

1. Define four different integer variables in your Quorum Box. An example of one integer follows (you come up with three others):

integer x = 5

2. Once you have a total of four integers in the Quorum Box, think of a math problem that uses addition, subtraction, multiplication and/or division on those variables. You may use parentheses. (The commands are listed below)

3. Do the calculation by hand and write down your answer.

**These are the COMMANDS used in Quorum: a + sign for addition, a – sign for subtraction, a * for multiplication, and a / for division.

4. Once you have the four integers in the Quorum Box, start the next command with a number variable called “A”, followed by an equal sign, and then the calculation you thought of. A partial example follows:

number A =

5. Add an output and say statement to your Quorum Box for the variable “A”. Then “Build” and “Run” the program.

A verbal description of the coding script you just wrote might be:

“Store four integers in four differently named integer variables. Perform operations on these variables and store the answer as a number variable called “A”. Then output or say A.”

– Did your answer match the computer’s answer? Use the same Journal Box you used above to record your observation.

5. ACTIVITY #5 – QUORUM EXERCISE (Operations- part 2)

Use the same four integers to make a more complicated problem. Use a combination of multiplication, division, addition, and subtraction. Parentheses can be used for order of operations.

You may use the same Quorum Box as Activity #4. Make sure you output or say the result.

If you are looking for an extra challenge, look up more advanced mathematical operations on the Quorum website and use those in your math problem. (You will get a chance to do this in Section 3)

Compare Quorum’s calculation to what you get using a calculator. Record your comparison (same or different) in the Journal you used above.

If you did not get the same answers, think about the type of variables (integers vs numbers) used. Discuss with the group how this could affect the answers.

*******************************************