0% found this document useful (0 votes)
20 views

Copy of ProgrammableRoverSE

The document outlines a student exploration activity using a simulation called Programmable Rover, where students learn to code instructions for a rover to navigate tasks on Mars. It includes vocabulary definitions, prior knowledge questions, and step-by-step instructions for programming using both block and text coding. The goal is to optimize the rover's code to complete missions while conserving battery power.

Uploaded by

mholmes711
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Copy of ProgrammableRoverSE

The document outlines a student exploration activity using a simulation called Programmable Rover, where students learn to code instructions for a rover to navigate tasks on Mars. It includes vocabulary definitions, prior knowledge questions, and step-by-step instructions for programming using both block and text coding. The goal is to optimize the rover's code to complete missions while conserving battery power.

Uploaded by

mholmes711
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Name: Kellan Holmes Date:

Student Exploration: Programmable Rover


Directions: Follow the instructions to go through the simulation. Respond to the questions and
prompts in the orange boxes.

Vocabulary: bug, call, code, code snippet, function, JavaScript, loop, optimize, program

Prior Knowledge Questions (Do these BEFORE using the Gizmo.)

1. Describe how you would make the remote-controlled car on the right
drive forward.

Press the forward button.

2. How do you think the car knows what to do when a button is pressed?

It has a command system built into it.


Gizmo Warm-up
In the Programmable Rover Gizmo, you are
preparing to send a rover to Mars to explore and
collect samples. During training, you will learn
how to write a program. A program is a set of
instructions that tell the rover what to do.

1. To begin, make sure you are on the EXPLORE tab. Drag


a Forward block (block with an up arrow) from the Block library
to the green On play function button. Click Play ( ).

What does the rover do? It moves forward

In programming, the forward block is an example of a function. When you click Play, this is calling the
function.

2. Click Reset ( ). Drag a Reverse block (block with a down arrow) to the bottom of the Forward block
and let go. The two blocks should connect. Then, click Play.

Now what does the rover do? it goes back forward

3. Click Next to move to another location. You now have two new blocks. What do you think they will tell the
rover to do? it turns right or left or forward or back.

Reproduction for educational use only. Public sharing or posting prohibited. © 2020 ExploreLearning™ All rights reserved
Get the Gizmo ready:
Activity A:
Block coding ● Switch to the TRAINING tab and make sure you
are on Warm-up task 1.

Introduction: A program is a series of instructions that control the operation of a machine. When the Gizmo is
in Block mode, each block is an instruction or code snippet.
Question: How do you use block coding to instruct the rover to complete tasks?
1. Program: You are on Earth in a training area that copies the Martian landscape you will explore during the
mission. To complete each training task, you will instruct the rover to drive to the blue X using code blocks.
Complete warm-up tasks 1 and 2 by dragging blocks from the library to the On play button. Click Play to
check your code. When you finish each task, open the Tools palette at upper left and click the 📷
Screenshot camera. Copy and paste the image here:

2. Explore: Switch to the EXPLORE tab. Click Next until you reach practice location 3.

A. What does the Kangaroo block do? it jumps (duh)

B. Click Next to go to practice location 4. a hand comes out from ze rover


What does the Hand block do?

C. Switch to practice location 5. repeats twice


What does the Loop block do?

3. Program: Switch back to the TRAINING tab. Make sure warm-up task 3 is selected.
A. Write a code that uses a Kangaroo block to instruct the rover to jump over the rock and drive to the
X. Take a 📷 screenshot when you have completed the task.

Reproduction for educational use only. Public sharing or posting prohibited. © 2020 ExploreLearning™ All rights reserved
📷

B. What percent (%) battery is left after completing the task? 94%

C. Click Reset. Click Clear to delete your code. Write a new code that instructs the rover to drive
around the rock to the X instead of using a Kangaroo block. Take a 📷 screenshot when you have
completed the task.

Reproduction for educational use only. Public sharing or posting prohibited. © 2020 ExploreLearning™ All rights reserved
Note: The picture is a bit blurry because I did the rest of this gizmo on my chromebook,
which has horrid camera quality.

D. What percent (%) battery is left after completing the task? 87%

E. Which code uses less battery power? The first one

Keep an eye on the battery when you practice other tasks. Your overall goal will be to complete the
missions without running out of battery power.

Activity B: Get the Gizmo ready:

Text coding ● On the TRAINING tab, select Warm-up task 1.

Introduction: Blocks are a simple way to start learning to code, but most programming languages use text-
based code. In this Gizmo, all of the blocks have a matching text snippet. The text snippets can be edited to
make the program more efficient. The text code is based on a computer language called JavaScript.

Question: How can you use text coding to optimize the rover’s programs?

1. Observe: When Warm-up task 1 is selected, make sure that two Forward blocks are under the On play
button. Click the Text radio button to switch to text mode.

A. What does the green On play button change to? FUnction On start

B. What does each forward block change to? translate (1)

The green button turns into the function onStart() {}. A function is a group of instructions. When the function is
called, all of the instructions inside of the {} brackets are executed.

2. Optimize: You should see two translate(1); snippets in a row. Delete one of the translate(1); snippets.
Then, in the other translate snippet change the 1 to a 2. Click Play.

What does changing the 1 to a 2 tell the rover to do? It reaches the x and doesnft pause
on each square.

3. Debug: Click Reset. Delete the semicolon (;) after translate(2).

A. What happens to the text? A squiggly line appears under it.

The red squiggly line indicates that there is an error, or bug, in your code. A code with an error will
not run. If you see a red squiggle again, check your code for errors.

B. Add the semicolon back. Does the program work now? Yup

4. Analyze: Switch to Warm-up task 2. If you have not already done so, write a code in block mode that will
solve the challenge. Click Play.

A. What percent battery is left after completing the task? 96 percent

Reproduction for educational use only. Public sharing or posting prohibited. © 2020 ExploreLearning™ All rights reserved
B. Click Reset. Switch to the text mode. What can you do to optimize this code, or make it shorter?

Delete two translate (1) one above;one below; rotate 90o;delete one from the leftover
translate (1) thingies, and add 2

5. Optimize: Adjust your code like you described in question 4, then click Play.

A. What percent battery is left now? 97%

B. Is the code optimized? Explain.

The new code saved extra percent battery (1%)

6. Program: Complete warm-up tasks 3 and 4 using text code. Optimize your code to use the least battery
power possible. When you finish each task, take a 📷 screenshot and add it to your document. As you go,
write the matching text for the code blocks below.

Reproduction for educational use only. Public sharing or posting prohibited. © 2020 ExploreLearning™ All rights reserved
translate -1 translate +1

rotate 90o left rotate 90o right

jump pickup

7. Program: Switch to the EXPLORE tab and to practice location 5. Select the Text function. Inside the
onStart(){} function, type the loop code: for(var i = 0; i < 2; i++){}. Inside the brackets ({}) of the loop, type
any code snippet you want. Click Play.

A. How many times does the rover repeat your code snippet? twice

B. Click Reset. Change the 2 of the loop code (in i < 2) to a 3. Click Play.

How many times does the rover repeat the code snippet? three

C. Now that you’ve seen these examples, describe what a loop does.

Repeats your code based on the number you programmed it to do

D. Place your cursor to the right of the “}” bracket that closes the loop. Type enter (or return) to go to
the next line. Type any code snippet you want. Click Play.

How many times is the new code snippet repeated? it didnt repeat, it just went once

E. Explain why it is repeated that number of times.because when the code is not in the var i=0<2 i++ it
doesng repeat

Get the Gizmo ready:


Activity C:
Mission programs ● On the TRAINING tab, click Next until you get to
Mission task 1.

Introduction: Congratulations! You have finished training. Now, as a certified NASA programmer, you are
ready to program the rover for its tasks on Mars. First, you will practice the missions here on Earth. Then, you
will send the rover to Mars.
Question: Can you write more complex codes to prepare the rover for a Mars mission?

Reproduction for educational use only. Public sharing or posting prohibited. © 2020 ExploreLearning™ All rights reserved
1. Program: Write codes that will complete mission tasks 1-4. You can start in block mode and then switch to
text mode to optimize your code, or write the code from scratch in text. After you complete each task, take
a 📷 screenshot and add it to your document. Answer the following questions as you go.

Reproduction for educational use only. Public sharing or posting prohibited. © 2020 ExploreLearning™ All rights reserved
A. For mission task 2, how can you edit the loop text to complete the mission in the most efficient
way? Put jump in a loop of 2

B. For mission task 3, try to get the rover to the X by jumping over the rock. How much battery power
does this save? Literally 1%

C. In mission task 4, how can you use a loop to conserve battery power?

translate 8, pick up, rotate left 90o looped

2. Challenge: Missions 5 and 6 are more complex. Use the Gizmo to solve these tasks, and then take a 📷
screenshot of each one. Add these screenshots to your document in the space below.

A. In mission task 5, the barriers are too high to jump over. How can you get to the X?

B. Optional: If you are up to the challenge, try finding two different ways to complete mission 6. Take a
📷 screenshot to record each method in the space below.

3. Mission: Switch to the MISSION tab. The rover is now on a faraway planet. Once you press Transmit
program, you cannot start a mission over again, so try to get to the X in one turn.
Click Transmit program to send your program to the rover. Do this for all 6 missions.

A. Did the rover complete all the missions? If so, congratulations!

Reproduction for educational use only. Public sharing or posting prohibited. © 2020 ExploreLearning™ All rights reserved
B. What battery % do you have left? Compare your results to your classmates.

Reproduction for educational use only. Public sharing or posting prohibited. © 2020 ExploreLearning™ All rights reserved

You might also like