Scratch for children programming Lecture 1: Scratch perfect first experience

 

Material and video download

Link: https://pan.baidu.com/s/1qX0T2B_zczcLaCCpiRrsnA
extraction code: xfp8

 

 

It is said that the future is an era of artificial intelligence and computer program control. How to expose young people to computer programming ideas and skills has become one of the important strategies for national talent development.

Scratch is a graphical children's programming tool designed and developed by MIT of the United States . Through graphical controls, children can implement many program functions without writing any code . From the initial experience, children over five or six years old can get started. Scratch uses the concept of stage and character. The built-in characters, animals, toys, etc. are still very attractive to children. Children can play as games. In the case where the child can't complete the program character independently, the parent or teacher can guide the child to complete the program design, make a small animation, and realize various changes. Generally speaking, the interest of the child is still very high. Students do not need to download the scratch software , they can use scratch.mit.edu directly on the MIT website. Can be saved as local files, local scratch software repair in change, it can also be saved directly to MIT online. I downloaded a 2.0 Chinese version of Scratch. The font of the control seems to be wrong. Later, I used the Scratch environment directly on the MIT Internet. This website supports Chinese. The language can be selected at the bottom of the page-Chinese.

In 2018, on the morning of the first day of the New Year, I started hands-on with a six-year-old child to complete the "Snow Battle", and I first realized the power of Scratch. Although today's exercises cannot be completed independently, the interest in programming that has been initially cultivated, all operations are done by the children themselves under the guidance of the parents, because the children treat this as a game.

First introduced what this software can do. Then directly select the stage background in the software gallery. After reading the stage background provided by the system, the child chose the snow and snow mountain background. Once you have a background, you can add characters. The default character is a kitten. Delete this kitten first. Therefore, you need to understand the left and right buttons of the mouse and click the right button to delete the selected character. The system provides classification of characters such as animals, fantasy, letters, reenwu, objects, and transportation. The children were excited when they saw these character galleries. They all seemed to put them in.

We determined that today ’s theme is to fly a character. So in the end, I chose the wizard, because I have seen the Harry Potter movie before. The plan is for the wizard to fly from the lower left corner of the stage to the upper right corner of the stage, and after reaching the upper right corner, return to the origin of the lower left corner. Later, crabs, bats, and ghosts were added. It is planned that the wizard is flying diagonally, the crab is rolling left and right, the ghost is flying horizontally in the middle, and the bat is flying from the bottom of the stage, and the bat will gradually become larger.

Complete the wizard's diagonal flight first. Introduce the X direction and Y reverse of the stage. The center of the stage is zero. If you want to move a character from left to right, does the horizontal X increase or decrease? The answer is X ++, such as adding 1 or 4 at a time. The more you add, the faster you fly. Then the wizard needs to fly upwards, so the Y direction must move upwards, that is, Y ++. If you want to fly to the left, then X-, and if you fly downward, Y-. On the far right of the stage is X = 240, on the far left is X = -240. The top of the stage is Y = 180, and the bottom is Y = -180. A negative number is a number smaller than zero.

With this understanding, we enter the script area. The first category of introduction is "event". In the event, we added "When the small green flag is clicked", which is the start button, and then perform some operations.

1) Because the default wizard image is relatively large, every time we start, we first set the size of the wizard to 60. How to do this? Enter the "Appearance", there is a control "Set the character size to XX", you can enter numbers in the XX space. Pull this control over and paste the beginning small flag tiles together. This is similar to Lego's WEDO. That is, several controls are put together in sequence.

2) To make the wizard fly to the right, we used the control "increase the X coordinate by XX" in "Motion", and we set an increase of 4.

3) To enable the wizard to fly upward, we used the control "Increase Y coordinate by XX" in "Motion", and we set an increase of 3.

At this time, you can start running, but each time you click to run, the wizard will only fly a little. You need to keep clicking to fly to the upper right corner.

How can the wizard fly continuously? The answer is to use loops.

4) The loop belongs to "Control". In the "Control" category, choose to repeat this box to include both the X and Y controls.

Because it is repeated countless times, we realized the wizard flying diagonally. But the problem came again. After the wizard touched the upper right corner, he flew out and did not move, because it was. how to solve this problem?

At this time we discuss, every time we fly, we will check, if the X coordinate is greater than 240, then we will return to the lower left corner of the wizard. So we added a judgment.

5) Judgment still belongs to "control", and "how to ... so" judgment is added to the control.

6) Judgment is conditional, the condition belongs to "operation", we go to "operation", drag a "XXXX> XXXX" judgment control to this "if ... Then"

Then get the current location of the wizard, which can be found in "X coordinate" in "Motion". The judgment conditions are:

X coordinate> 240.

7) If the conditions are met, we must return the wizard to the origin, that is, the X coordinate is equal to -240 and the Y coordinate is equal to -180.

After running, the wizard began to fly diagonally. After flying to the upper right corner, he returned to the sitting corner again, repeating non-stop.

Later, in the same way, we realized from left to right next to it, and added a movement action "turn right XX degrees".

We chose the movement of the ghost, from left to right, but it is simpler, no judgment is used, but it is executed 120 times to the right, and the X axis increases by 4 each time. After the execution is completed, it continues to execute 120 times, but increases by -4 each time. This realizes non-stop movement.

For bats, we added a size change. Move from bottom to top, or use judgment, and return to the bottom after reaching the top. When the bat moves up, our size gradually becomes larger, and then when we return to the original point, we reset it to the size at the beginning.

We use a browser and directly use Scratch on the MIT website. Finally, we save the project on the MIT website and save a copy to the local computer desktop.

The child said to design a game that can fire shells. Next time, we plan to let a plane fly from left to right, and then be able to drop bombs during the flight. The airplane is a character, and the bomb is a character. The key is to calculate the position. To realize the bomb is dropped from the aircraft.

To continue learning, you have to eat well and do your homework first. Sure enough, with this expectation, today's baby is still very obedient.

Summing up what I learned today:

1. Stage: I will add the stage background myself.

2. Role: I will add a role myself.

3. Event: Start

4. Appearance

a. Set the character size to 60

b. Increase character size by 2

5. Sports

a. Increase the X coordinate by 4

b. Increase the Y coordinate by 3

c. Turn right 4 degrees

d. X coordinate: read the value of X coordinate

e. Move to X = -240, Y = -180: return to the lower left corner.

6. Control

a. Repeat execution: unlimited, repeat forever

b. Repeat 140 times: X + 2 each time

c. If? ? Then? ? : If X> 240, return to the original position.

For these classifications, I ca n’t remember the first time, and I hope to spend half a day every week, through practice, memory, to complete these tasks by themselves. At other times, you can explain various designs, controls, and basic knowledge.

a1

In the first lecture on the blackboard, some important points were written. The child said that he can understand and can go back. If he wants to fly to the right, X should increase or decrease, and Y should increase or decrease.

44

scratch programming environment. The upper left corner is the stage. Below you can choose the stage background image and characters. The pictures in the gallery are used directly here. On the right are scripts and control programs.

dd

Background Gallery

640 (2)

Classified characters: there are fantasy, animals, characters, objects, transportation, etc., which are still very attractive to children.

640 (3)

This is an operation script. When the wizard is flying, he returns to the origin when he flies to the upper right corner, so the judgment X> 240 is used here. 

640 (4)

The classification in the script is still very good, you can see which category it belongs to by color. However, the child must first know that a certain control is in a certain category before it can be found. For example, the judgment is in the control, the judgment condition is in the calculation, the size change is in the appearance, the left and right of XY are transformed, and the rotation is in motion.

640 (5)

Appearance control

640 (6)

The ghost program, from left to right, and then back.

There are children over five or six years old who can try this scratch programming, which can be used as a game.

Guess you like

Origin www.cnblogs.com/kixiaoyuan/p/12691471.html