D) Quorum Computer Language (2)
This part will cover two more Quorum commands. Then all the commands you have learned so far will be used in a computational thinking exercise. The link to the PDF containing the text file of commands is below:
A) COMMAND: input
para0: It would be helpful to have a way to input data to the computer. To do this, we use a function called input, which is a mini program that is built into Quorum. For built-in functions like “input”, the computer goes to a Quorum library to learn what to do.
Chris describes this in the following 1:04 video:
Let’s try this example, typing it exactly as below. You may use any open Quorum Box, or the link to the Quorum Box listed below. Arrange the windows for your vision. Make sure to RESET your code if needed.
“text telescope = input(“What telescope would you like to use?”)”
The right side tells the computer to go to the Quorum library and use the mini function for input. This mini function then tells the computer to display, in a pop-up window with a box for the user to type their answer, whatever text is inside the parentheses. The left side tells the computer to store whatever the user types in the input box to a text variable named telescope.
What command should come next in order to see or hear what the user typed? Add that command to the Quorum Box.
When you run your program in Quorum, you can input your answer with any of the actual Skynet telescopes discussed previously.
Now it’s your turn to come up with an input statement.
– Change the first line to a different question within the quotes.
– Change the variable name ‘telescope’ to whatever makes sense.
*** When you change the name of the variable, what else will you have to change in the rest of the code?
Above, you simply had the computer output the variable name “telescope”. We can make this more user friendly by stringing words and variable names together in an output statement like you did in the Go Code game.
Type into the Quorum Box the same input statement you used above about telescopes:
“text telescope = input(“What telescope would you like to use?”)”
Then output (or say) a text statement that starts with something like “You have chosen”
Use a + sign after the text in quotes to include the variable name.
Select RUN when you are satisfied.

B) COMMAND: cast
Chris describes the cast command in this 2:16 video:
Sometimes we will want the computer to interpret the input text as a number instead of text. To do this we use a command called “cast”. It will change one variable type into another. Type the statement below into a Quorum Box to familiarize yourself with the format. You will be using this command several more times in upcoming sections.

– This can be translated (or read as): The text input for the question is “cast”(or changed) to a number variable called “seconds”. Notice there are two sets of parentheses.
Come up with a numeric question for a user to input, for example, “How old are you?”, and cast the user’s input into a number or integer.
– Then output (or say) a user friendly statement that includes the numeric answer.
If your teacher/leader wants you to, copy and paste the successful script into the Journal Box below.
C) Using Computational Thinking
Tyler, our asteroid astronomer, discusses the meaning of computational thinking.
The following computational thinking exercise uses the Quorum commands you have learned so far: output, say, input, and cast. You will also use what you have learned about the four types of data variables, operations on these variables, and how to string text and variables together into user friendly output statements.
A study done in 1996 by P.A. Bland, estimated 18,000 to 84,000 meteorites larger than 10 grams (about the weight of ten paperclips) strike the earth each year. This means there are many meteorites that make it to the surface of the Earth each night!
Using either a Quorum Box in another tab, or the link to the Quorum Box below, do the following exercise:
1. What are the chances one of these meteorites would strike the roof of your house? Find a partner or two and decide on how to formulate the problem in a way you can use a computer to solve it.
2. Make it user friendly with good input statements and output statements. You will need to decide on what variables will be needed and how to use them.
3. As an added challenge, make this program work for these asteroids striking any planet or moon in the solar system.
**Teachers/Leaders: You can find help and example scripts for different levels of learners for this exercise under the Resources tab at the top (make sure and click “For IDATA” which is to the far right of the title “Resources”).
Copy and paste your successful script into the Journal Box you used above.
Then answer the following questions:
a) How many variables of each type did you use?
b) What was the hardest part of this coding problem?
c) What did you need to change to make it work for anything in the solar system?

  • Previous Page ** Next Page