1st Challenge: Draw a square. - THE BLACK TEAM



Scratch 2.0 "2018"??Welcome back to Scratch coding.? This project will be given to you to follow some directions to create, but you and your partner will make enhancements to make it a game worth playing for skill or for fun! There are notes to be taken each day, which will require your team working as a pilot and co-pilot each day.?SAVE all Scratch files with NO spaces in the titleOur first coding project this year will be a team project?that includes a section to record what you have done (accomplished), successes or problems that you have had with this project and overall result. ?You will set up a?new Google document?to record your notes.Find your definitions(1-3) What are the following: a?stage, a?sprite, and what are?blocks?HYPERLINK "" \t "_blank" "" \t "_blank" "" \t "_blank"(1 each) What are the?six shapes of blocks?AND what do these blocks do?HYPERLINK "" \l "Block_Shapes" \t "_blank"(1) What is a?script?HYPERLINK "" \t "_blank"(2) What are the?two coordinate positions?used in Scratch and what system is it called?HYPERLINK "" \t "_blank"(2) What are the?two ways to create images?in Scratch?HYPERLINK "" \t "_blank" "" \t "_blank"(1) Explain "broadcasts" and what blocks are used to create them!HYPERLINK "" \t "_blank"(1) So, what is a?remix?in Scratch?HYPERLINK "" \t "_blank" you answer these questions, you should?share these with your partner.? When the project is completed, you will share the work with your teacher!So let's start Scratching this year!Scratch Game #1??Lesson 1.1.?Choose a background and character.Click on the stage and backgrounds tab and either import one of the Scratch backgrounds or paint/create your own. In this example?Underwater background?is used.Delete the Scratch-cat (using the scissors on the top) and either create your own character or import one of the Scratch characters or import a character that was created/designed elsewhere.Once a sprite/character has been imported, you can change it (modify). Even default Scratch characters can be customized - this lesson uses a standard Scratch fish with the color changed.2. Move the character with arrow keys. Add the following script to move character each time the keys are pressed. The important new block is the ‘Point’ block. Click on the ‘Always face left/right’ or Do not rotate if the character should not flip around when moving.To?flip the fish?so that he or she doesn't go upside down.1)?Duplicate your fish sprite?and then?flip it upside down?2) Code it with a the?purple "looks" blocks?to switch costumes to the upside down copy on the?move to the left..screenshot1Scratch.JPGLesson 21. Add a new sprite, the food, for the character to catch/eat.In this example a small yellow circle (a simple gold coin) is created and named ‘food’.Set the position of character and food, have food disappear when eaten and have character show that it ate the food.2. Set position of the food using the?xy coordinates.?Have it disappear or be eaten when touched by the character.The following script shows how to set the coordinates of the food and have it disappear when the character (red fish) touches it. It uses the Hide/Show in the Looks blocks.It also broadcasts a message ‘eaten’ that the fish will use to change or say something when it eats food.Script for the food is as followsScript to add to the fish?along with the arrow keys movement scripts isTime out - what is Broadcasting? 3In this lesson, expand on the above by explaining the use of?random numbers,?and the use of?broadcast.Each time the game is played (the green flag is clicked) the food is always in the same place. Instead of picking the x,y coordinates, let the computer pick it randomly, by using random numbers.See the new script for food.?In this it also hides and reappears after waiting? second at a different place.This is for the fish program: ?Use the?broadcast message "food is eaten"?to change the fish, example below shows fish getting bigger, and changing color.In this case you will need to reset the fish to original. See below on changing fish on broadcast and resetting on green flag.Lesson 4Use scripts similar to that of food to create an enemy, example the shark. After the shark waits and touches the fish, it can broadcast a message to tell that the game is over. The Game Over sprite can then listen for this message and show itself and stop the game. In this example, the Shark also moves slowly around forever in the tank, starting by pointing at a random angle and then bouncing off the edges.Create a sprite called GameOver and set it to stop the game when the Shark touches the fish, and the broadcast message is received. In this example, the Game is also over if time runs out using the wait as a timer.Lesson 5If there is a definite way to win the game, example catching all the food (this example the count of food is 4), then another sprite called YouWin can be used as follows.To count the food caught, create a variable called count and use it as follows in the YouWin sprite.Extras for coding this gameTitle screens and levels:Look at this one: "" \t "_blank" "" \t "_blank" "" \t "_blank" "" \t "_blank"\ online removal:HYPERLINK "" \t "_blank" score examples from other schools:HYPERLINK "" \t "_blank" "" \t "_blank" for this project are on the bottom of this note!Scratch Project Two (Geometry)Click the "Create" button near the top left of your browser window to start a new project.The area in the top left quadrant of the window is called the?Stage, and it's where you can see the audio and visual output when you run a program. The?Green Flag???icon at the top right corner of the Stage is used to start your programs.The area below the Stage to the bottom left is called the?Sprite List?and is where the characters and objects in your project are listed. ?Scratch refers to these objects as Sprites.The central area that divides the interface is called the?Palette, and it holds all the code blocks that you can use to control your Sprites. Notice that there are ten color-coded sections. Clicking on each one shows a new set of code blocks for programming your Sprites.Finally, the large area that's the whole right side of window is called the?Scripts Area. It's used for building your programs. Drag code blocks from the Palette into the Scripts Area and stack them in sequence to make your Sprites do things.1st Challenge: Draw a square.For our first task, we'll teach our Sprite to draw a square on the Stage. Add the following code blocks on the left to the Scripts Area, and then click the Green Flag??to run your program and see the visual output on the right.?Did your Sprite draw a square??Guess what -- you are now a programmer! It can be as simple as that.?First Challenge (+) Advanced: Draw the same square using only ? as many code blocks.When you're working with students, ask them if they notice a pattern of "Move" and "Turn" blocks. We can teach the computer a simplified sequence with a "Repeat" loop.Click on the top-most Move block and drag it away from the rest of the sequence.Attach the code blocks below after the?"Pen Down"?block and click the Green Flag??to run your program.This square drawing program now uses a?loop.?That's something that computers do really well -- they can execute repetitive tasks without getting tired or bored. Let's keep going and teach the Sprite to draw a new shape.Second Challenge: Draw a triangle.What are the properties of a triangle? ?A triangle has three sides and three angles. We can draw an equilateral triangle by editing our square program.Change the "Repeat" loop to repeat three times.It's OK to leave the "Move" block as is (but it?is?fun to change the value).Change the "Turn" block's value to 120 and click the Green Flag??to run your program.Notice that the "Turn" value is a measurement of the exterior angle and that?all three exterior angles of a triangle will add up to 360 degrees. Let's do another!Third Challenge: Draw a simple, regular pentagon and use a mathematical "Operator" blockLet's use more computation and take advantage of the mathematical operator blocks in the Palette. To draw another simple, regular polygon (like a pentagon), write your understanding of the rule of exterior angles as a coded expression.Go to the green "Operators" section of the Palette and locate the block for division, represented by the forward slash symbol ( / ). Insert the whole block into the space provided in the "Turn" block.We know that the five exterior angles will split equally within the 360-degree turn, so we can fill in the division operator to read?.Edit the "Repeat" loop to repeat five times, once for each angle or side, and run the program.Fourth Challenge: Create one final Geometric Shape (ANY shape).HYPERLINK "" \t "_blank" it all together (Fifth and final design):? we need to take one (or more) of your shapes and turn this into a flower design! ?Do NOT copy this one, but here is an example. there are many more: - that you DO copy the first six code blocks to set the drawing up. ?HYPERLINK "" \t "_blank" "" \t "_blank" at this one:HYPERLINK "" \t "_blank" that there isn't a sprite showing what the image will become. ?This is all accomplished by programming (scripting) into geometric shapes. ?TURN this in with your shapes!Wrapping UpRemember, programming is just giving instructions to a computer. ?Teaching you to program gives a new sense of knowledge over your technology.?You are moving from simple consumers of technology into creative makers of technology.?If you can teach your computer to draw, what else can you make it do??Think of programming ?as a new medium to learn with and express ideas.With this unit you have now explored four core computational thinking concepts:?sequences, events, loops, and operators.Look at these examples for geometric fun!HYPERLINK "" \t "_blank" "" \t "_blank" "" \t "_blank" "" \t "_blank" "" \t "_blank" advanced:HYPERLINK "" \t "_blank" Fish Food Rubric Enha...16.3 KBleft0Notes and Definitions Rubric ...29.0 KB ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download