Programming I (mBlock) I (mBlock).pdf · Lesson 16 – Stopping 05:01 Two instructions in the video...
Transcript of Programming I (mBlock) I (mBlock).pdf · Lesson 16 – Stopping 05:01 Two instructions in the video...
Computer Literacy Programming I (mBlock)
__________________________________________________________________________________________
Page 1 of 16
Programming I (mBlock) http://www.plk83.edu.hk/cy/mblock
Contents
1. Introduction (Page 1)
2. What is Scratch? (Page 1)
3. What is mBlock? (Page 2)
4. Learn Scratch (Page 3)
5. Elementary Lessons (Page 3)
6. Supplementary Lessons (Page 10)
Introduction
A computer program is a collection of instructions that performs a specific task when executed
by a computer.
A computer program is usually written by a computer programmer in a programming language.
Examples of programming languages: C, Java, Visual Basic, Pascal, etc.
What is Scratch?
Scratch (https://scratch.mit.edu/) is a project developed by MIT Media Lab. It allows students
to lean computer programming interactively.
Watch the short video and click the above “TRY IT OUT” to use the Online Editor.
The Offline Editor can be downloaded from https://scratch.mit.edu/scratch2download/.
Computer Literacy Programming I (mBlock)
__________________________________________________________________________________________
Page 2 of 16
What is mBlock?
mBlock is a graphical programming environment based on Scratch that makes it easy to learn
computer programming. In addition, mBlock can support the computer programming of single-
board computer and robot car.
mBlock can be downloaded from the official web site http://www.mblock.cc/.
There are 3 tabs in the programming environment.
Scripts – scripting language commands are divided into many categories.
Costumes – new costumes can be tailor-made.
Sounds – new sounds can be recorded and edited.
Computer Literacy Programming I (mBlock)
__________________________________________________________________________________________
Page 3 of 16
Learn Scratch (http://learnscratch.com)
This web site hosts many useful teaching videos for students to learn Scratch. If you are using
the mBlock, you have to adjust a little bit.
The learning videos can be also retrieved from http://www.maklary.com/LS/LearnScratch.htm.
Elementary Lessons
There are 3 sets of videos in Learn Scratch. First, students are suggested to attain the 8 lessons
in Scratch 1.
Activity 1
Lesson 1 - Motion and Sound
Part 1 Start Moving 01:35
State 2 differences between the following instructions.
1. ____________________________________________________________
2. ____________________________________________________________
Part 2 Add a Sound 01:55
In the following instruction, how many different sounds can be chosen? ________
Part 3 Start a Dance 01:59
Computer Literacy Programming I (mBlock)
__________________________________________________________________________________________
Page 4 of 16
Lesson 2 – Repeating Actions
Part 1 Again and Again 02:38
How to stop the following instructions? ________________________
Part 2 The Green Flag 00:55
Can we use the following instruction more than one time for a single sprite?
___________
Design an action with the sprite moving steadily from the left to the right on
the stage.
Sound should be played when the sprite is moving.
Click the Green Flag to play the action.
Save your project and show it to your teacher.
Computer Literacy Programming I (mBlock)
__________________________________________________________________________________________
Page 5 of 16
Activity 2
Lesson 3 – Playing with Color
Part 1 Change Color 01:34
How many kinds of effects can be changed with the following instruction? ____
Part 2 Pressing Keys 01:31
Find the missing instruction such that we can use the space key to move and stop
the sprite. ___________________
Use the left and right arrow keys to move the sprite to L.H.S. and R.H.S.
respectively. Use the key ‘c’ to change the colour of the sprite.
Save your project and show it to your teacher.
Computer Literacy Programming I (mBlock)
__________________________________________________________________________________________
Page 6 of 16
Activity 3
Lesson 4 – Create Your Own Sprites 02:13
Find the following features:
“Import”, “Flip”, “Grow”, “Shrink”.
How to make the background transparent? ______________________________
Lesson 5 – Speaking and Thinking 02:48
What is the difference between the following two instructions?
_______________________________________________________________
Computer Literacy Programming I (mBlock)
__________________________________________________________________________________________
Page 7 of 16
Remove the original sprite from the stage.
Insert 2 sprites named as “Elephant” and “Monkey1” onto the stage.
Click the Green Flag to show the conversation of the two sprites.
(Hint: Use 2 different sets of scripts for the 2 sprites and the following
command.)
Save your project and show it to your teacher.
Activity 4
Lesson 6 – Create Image Effects 01:12
Name the Image Effect to produce the following result. ________________
Lesson 7 – Sounds, Voices and Music 01:44
By comparing the following two sets of instructions. State the difference between
them. ___________________________________________________________
Computer Literacy Programming I (mBlock)
__________________________________________________________________________________________
Page 8 of 16
Lesson 8 – Creating Animations 01:36
Insert the following sprite onto the stage.
Click the Green Flag to make the boy walking from the left to the right.
Change the image effects (i.e. color & brightness) and costume when the
boy is walking.
Insert sound effect.
Save your project and show it to your teacher.
Computer Literacy Programming I (mBlock)
__________________________________________________________________________________________
Page 9 of 16
Task 1
“A race between a rabbit and a tortoise” is a very famous story.
Click the Green Flag to tell this story with the following requirements.
1. Stage backdrops (switch the backdrop with the following command).
2. The rabbit and tortoise sprites (preferable with more than one costume).
3. Speaking and thinking.
4. Motion with animation.
5. Sounds.
Computer Literacy Programming I (mBlock)
__________________________________________________________________________________________
Page 10 of 16
Supplementary Lessons
There are 24 lessons in Scratch 2. Some selective lessons can be attained in the following
activities. Of course, students are encouraged to attain other lessons in Learn Scratch.
Activity 5
Lesson 6 – Size, Presence and Layers
Part 1 Changing Size 03:17
In the video, the following instruction has been obsoleted.
Use the following instructions to get the same result.
Part 2 Show and Hide 03:51
Part 3 Controlling Layers 01:51
Insert 2 sprites onto the stage as shown below.
Use the following keys to perform corresponding actions.
Key 1: Hide the monkey
Key 2: Show the monkey
Key 3: Enlarge the monkey
Key 4: Diminish the monkey
Key 5: Move the monkey to the front
Key 6: Move the monkey to the back
Save your project and show it to your teacher.
Computer Literacy Programming I (mBlock)
__________________________________________________________________________________________
Page 11 of 16
Activity 6
Lesson 12 – Beginning and Waiting
Part 1 Beginning Actions 04:02
Part 2 Waiting 04:53
Insert a “Magic Wand” and an “Apple” sprites onto the stage.
Use the arrow keys to move the Magic Wand.
When the Magic Wand touches the Apple, another Apple can be produced.
Save your project and show it to your teacher.
Activity 7
Lesson 13 – Repeating Actions
Part 1 Doing Forever 04:24
Part 2 Repeating Actions 02:28
Remove the original sprite from the stage.
Insert the following sprite onto the stage.
Make the ball moving continuously and bounce against the four edges of
the stage.
When the ball reaches an edge, it should play a sound.
Save your project and show it to your teacher.
Computer Literacy Programming I (mBlock)
__________________________________________________________________________________________
Page 12 of 16
Activity 8
Lesson 15 – Conditional Actions 07:30
Insert two more sprites onto the stage.
Use the keyboard to move the panda. When the panda touches the dinosaur,
it says “Help!”. When the panda touches the monkey, it says “Hi!”.
Save your project and show it to your teacher.
Computer Literacy Programming I (mBlock)
__________________________________________________________________________________________
Page 13 of 16
Activity 9
Lesson 16 – Stopping 05:01
Two instructions in the video have been replaced by a new instruction.
Lesson 17 – Mouse and Keyboard Control
Part 1 Mouse Report 06:07
Part 2 Pressing Keys 03:15
Insert the following sprite onto the stage.
Using the following commands to make the ball moving along the mouse
pointer.
Save your project and show it to your teacher.
Computer Literacy Programming I (mBlock)
__________________________________________________________________________________________
Page 14 of 16
Task 2
A magic show should be produced.
The following requirements should be fulfilled.
1. Select a suitable stage backdrop.
2. Insert a “Wizard” sprite and 3 animal sprites.
3. The size of the sprites should be adjusted properly.
4. Use the keyboard to move the “Wizard” sprite.
5. When the animal sprites are touched by the “Wizard” sprite, different magical changes
should be produced.
6. Press the space bar to reset all the magical changes.
Computer Literacy Programming I (mBlock)
__________________________________________________________________________________________
Page 15 of 16
Instruction List
Elementary Lessons
Lesson 1 - Motion and Sound
Lesson 2 – Repeating Actions
Lesson 3 – Playing with Color
Lesson 4 – Create Your Own Sprites 02:13
Lesson 5 – Speaking and Thinking 02:48
Lesson 6 – Create Image Effects 01:12
Lesson 7 – Sounds, Voices and Music 01:44
Lesson 8 – Creating Animations 01:36
Supplementary Lessons
Lesson 6 – Size, Presence and Layers
Computer Literacy Programming I (mBlock)
__________________________________________________________________________________________
Page 16 of 16
Lesson 12 – Beginning and Waiting
Lesson 13 – Repeating Actions
Lesson 15 – Conditional Actions 07:30
Lesson 16 – Stopping 05:01
Lesson 17 – Mouse and Keyboard Control