15. 1.2 Basic Principles of Programming 1. Algorithm Activity
Computers read the commands in order.
Sequential
Computers can repeat the same commands
by the number or condition.
Repetition
Computers can perform different commands
by conditions.
Conditional
16. 2.1 Move the objects
2.2 Make an Electronic Locker
Entry Programming
2
17. 2.1 Move the objects 2. Entry Programming
play-entry.com
18. 2.1 Move the objects 2. Entry Programming
Object
Object List
Block
Box
MENU
Block
AssemblyStart
Performing
Screen
19. 2.1 Move the objects 2. Entry Programming
The coordinates of the Performing Screen
-240 240
-135
135
20. 2.1 Move the objects 2. Entry Programming
Let it wander freely
21. 2.1 Move the objects 2. Entry Programming
Move it with your mouse pointer
22. 2.1 Move the objects 2. Entry Programming
Add
an object
23. 2.1 Move the objects 2. Entry Programming
Say ‘Hello!’ if Entrybot meets his friend.
Let me introduce myself first. My name is Jaehwi Alice Kim. You can call me Alice.
I’m a bachelor of science education, and master of robot education.
I worked as a elementary school teacher for 5 years.
And now, I work as a researcher at Entry Labs which provide software education platform.
Last year, government of Korea announced that they’ll set SW education as mandatory by 2017.
There are over 200 pilot schools for SW education running around the country.
Most of them use Entry for their SW curriculum.
Today, we’re going to experience software education by Entry.
There will be two activities we’re going to do. First, Algorithm Activity. Second, Entry Programming.
Let me show you how to start Entry.
Access our website with chrome browser.
Enter play-entry.com.
Please choose the language as English from the bottom of the homepage.
You can use everything we provide for free.
But to save and share programs you make, please join our website first.
Join us as a student.
When you join, sign in.
To access the Algorithm Mission page,
Change the address like this.
Let’s program Entrybot to get to his friend.
You can see some commend blocks at the Block Assembly.
We call it ‘Code’.
When Start is pressed, Move forward, Move forward.
Let’s click the Start button.
Entrybot will move by the code.
What do you need more?
You can drag blocks from Block box to Block Assembly and assemble them like Lego blocks.
Let’s move to the next step.
There is a hive on the way. You should jump it to pass.
Try it by your selves.
Now, the way you need to go is a little far.
How many ‘Move forward’ blocks you need?
But you can use maximum 3 blocks only.
So you’d better use ‘Repeat’ block to shorten the code.
Wow, the path is quite complicated.
You can use maximum 5 blocks.
What codes should be repeated?
Try it!
We don’t want to program Entrybot for each maps differently.
To make Entrybot smarter we can use ‘If’ block.
We want him to move forward basically.
But what if he meets a wall?
What should he do?
This is very similar map of the previous one.
Try it by yourselves.
We experienced three basic principles of programming for now.
First, Sequential. We assembled the commands blocks in order than Entrybot performed them in order, too.
Second, Repetition. We could make code shorten by ‘Repeat’ block. Repetition is very important and useful thing that computer does well.
Third, Conditional. We used ‘If’ block to make Entrybot perform different code by the condition. It’s very helpful to make a program for general usage.
Now we are going to make
Now let’s go back to the homepage.
At the top menu, press Create and Create new.
Let me introduce the page layout.
You can see Entrybot, we call that ‘Object’.
Object are the things like charactes, textbox, or backgrounds which we can move by codes.
We can easily add objects by ‘Add objects’ Button. And below that we always see the ‘Object List’ that we have.
In the middle, we can see the Block Box. There are many categories for command blocks.
You can drag those blocks to the Block Assembly. We call the blocks assembled ‘code’.
When we click the ‘Start’ button, the objects will perform by the code. So we call the screen as ‘Performing Screen’
And there are many useful menus on the top.
The performing screen is consist of the coordinates.
X axis is from -240 to 240 and Y axis is from -135 to 135.
Let’s see the code on the Block Assembly.
When you press ‘start’, Entrybot will move. How far do you think Entrybot moved?
Let’s make him wander on the screen.
Instead of ‘Repeat 10 times’ block, We can use ‘Repeat infinitely’ block.
Take apart the blocks and trash a block that we don’t need to the trash can.
And let’s assemble ‘Repeat infinitely block, instead of that.
When you