1st ESO: Technology, Programming and Robotics. Unit 5: Programming. Autor: Guillermo Gómez

Similar documents
Teacher Cheat Sheet - Game Coding Challenges

Crossley Fields - Computing Vocabulary

Scratch Lesson 2: Movies Made From Scratch Lesson Framework

S3 Scratch Programming

Add in a new balloon sprite, and a suitable stage backdrop.

ICS 61 Game Systems and Design Introduction to Scratch

Teaching Kids to Program. Lesson Plan: Catch the Ball

Meet the Cast. The Cosmic Defenders: Gobo, Fabu, and Pele The Cosmic Defenders are transdimensional

Making a maze with Scratch

Key Stage 2 Scratch, Python and Kodu (Beginners)

AN INTRODUCTION TO SCRATCH (2) PROGRAMMING

Scratch. Creative Computing

Lesson 3 Creating and Using Graphics

VISUAL PROGRAMMING BY SCRATCH

The City School PAF Chapter Comprehensive Worksheet April 2018 ICTech Class 7 Candidate Name: Index Number: Section: Branch/Campus: Date:

Animate a Name Cards

SCRATCH MODULE 3: NUMBER CONVERSIONS

All Blocks of Scratch

Figure 1: My Blocks are blue in color, and they appear in the Custom palette in NXT-G.

E U R O P E A N P R O J E C T P R O M O T E D B Y :

In this lesson you will learn: How to capture the input from the user. How to write programs using variables and lists. Athletics Swimming Gymnastics

Erasmus+ Project: Yestermorrow Year 1 Maths: Pythagorean Theorem

Animate a Character Cards

Lost in Space. Introduction. Step 1: Animating a spaceship. Activity Checklist. You are going to learn how to program your own animation!

SCRATCH. Introduction to creative computing with Scratch 2.0

Lost in Space. Introduction. Scratch. You are going to learn how to program your own animation! Activity Checklist.

Final Revision. 1)Put ( ) or ( ):

Digital Technologies in focus:

Computer Science Concepts in Scratch

The Environment. Scratch Programming. The Environment. The Environment. The Environment. The Environment. Lesson 1: Introduction THE STAGE

Computer Science Concepts in Scratch

Awesome PowerPoint Tricks for Effective Presentations

The City School. PAF Chapter Comprehensive Worksheet May 2017 ICTech Class 7 Candidate Name: Index Number: Section: Branch/Campus: Date:

Lineup. Introduction. What you will need. Import your costumes. What you will make. What you will learn. Hardware. Software

CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch

We created a few different effects and animations using this technique as applied to clones.

SCRATCH PROGRAMMING. Lesson 7: Create a Scratch Cartoon Animation

SMART Notebook Handbook Old Vicarage School SMART Notebook 18.1 Handbook. Guy Colnbrook Page 1 of 64

Prezi Creating a Prezi

SCRATCH BUILDER R Q R O B O T C O D I N G G U I D E

In this lesson you are going to create a drawing program similar to Windows Paint. 1. Start with a new project and remove the default cat sprite.

CO-ORDINATES AND GEOMETRY MODULE 6: INVESTIGATION 2. Coordinate Shapes

Windows Movie Maker / Microsoft Photo Story Digital Video

Make a game in which you play the notes of a song as they scroll down the stage.

The City School PAF Chapter Comprehensive Worksheet April 2018 ICTech Class 7 Candidate Name: Index Number: Section: Branch/Campus: Date:

Walk Cycle with Symbols

Instance Name Timeline. Properties Library. Frames, Key Frames, and Frame Rate Symbols movie clips. Events and Event Handlers (functions)

Rev. D 10/26/2012 Downers Grove Public Library Page 1 of 44

Game on Slots of fun YOUR FRIENDLY GUIDE TO PCS + GADGETS + THE WEB WINDOWS 8

ONE HOUR ANIMATION. Will you be a Scratcher upon completion of this session? Definitely. Learn how to write a basic script to animate a sprite.

Quick Reference Tables

Adapted from Code.org curriculum

Studuino Programming Environment Manual

Scratch & Cartesian Coordinates Background/ stage

Introduction to Scratch Programming v1.4 (Second Ed) Lesson 6 Calculator

M O T I O N A N D D R A W I N G

Not For Sale. Glossary

micro:bit game controller with Scratch

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. App Inventor Workbook

Tutorial guideline for App Inventor

Scratch Programming for Primary School Teachers Quiz Game

The City School PAF Chapter Comprehensive Worksheet May 2016 ICT Class 6

Design a Simple Fan in 123D Design

Holy Family Catholic Primary School Computing Progression Map Year 1

Scratch Programming In Easy Steps Covers Versions 2 0 And 1 4

Scratch Programming In Easy Steps

How to Create a Simple Animation Using MAYA

Story 1: Greedy dog. 1. Beginning: setting background and casting characters. 2. Middle: Developing the story.

The largest professional kids coding academy KODING KINGDOM (HK) LIMITED

Chromebook Basics: Introduction School Year

TTS Scratch Controller. Teacher Guide. 1 TTS Scratch Controller - Teacher Guide. Product Code: EL00530

Robotics II. Module 3: Dealing with Files

INVIGILATED BY MARKED BY MARKS TALLIED BY

Mach4 CNC Controller Screen Editing Guide Version 1.0

REMEMBER TO BRING YOUR MEMORY STICK TO EVERY LAB!

ECB Digital - Way to Go! (7th Grade)

Anjuli Kannan. Google Earth Driving Simulators (3:00-7:00)

1. Defining Procedures and Reusing Blocks

Making use of other Applications

SQL Server. Management Studio. Chapter 3. In This Chapter. Management Studio. c Introduction to SQL Server

Creative Uses of PowerPoint 2016

Introduction. Download. SMARTBoard

Working with the Dope Sheet Editor to speed up animation and reverse time.

The Beauty and Joy of Computing 1 Lab Exercise 1: Introduction to Scratch/BYOB - Animations and Communication

PowerPoint for Art History Presentations

Point of View Mobii 825D - Android 4.2 Tablet PC. General notices for use... 2 Disclaimer... 2 Box Contents... 2

ANSWER KEY. Chapter 1. Introduction to Computers

Getting Started with Java Using Alice. 1 Copyright 2013, Oracle and/or its affiliates. All rights reserved.

The purpose of this tutorial is to introduce you to the Construct 2 program. First, you will be told where the software is located on the computer

1. What is the name of the control unit in Robotics? a. R2D2 b. MSN c. Pilot d. XJ7 e. RCX

Chapter 6: Interfaces and interactions

DESIGNED FOR STUDENTS WHO STRUGGLE WITH NOTE-TAKING AND OTHER CORE STUDY SKILLS

How to Construct. Accessible Talking Books MAC

Programming Scratch to Control a K NEX Fairground Ride

Game keystrokes or Calculates how fast and moves a cartoon Joystick movements how far to move a cartoon figure on screen figure on screen

ECB Digital - Our World (5th Grade)

LECTURE 3 ADMINISTRATION SECTION -A

ECB Digital - Click 3 (4th Grade)

DOWNLOAD PDF MICROSOFT OFFICE POWERPOINT 2003, STEP BY STEP

Transcription:

1st ESO: Techlogy, Programming and Robotics Unit 5: Programming Autor: Guillermo Gómez Contents Prior kwledge... 2 Keywords... 2 Mindmap of the unit... 2 5.1. Programming basics... 3 5.2. Example of IDE: Scratch... 4 5.2.1. Introduction... 4 5.2.2. GUI (Interface)... 4 5.2.3. Example... 5 5.3. Programming apps for mobile devices: MIT App inventor... 7

Prior kwledge Activity: Summarize your general kwledge on this topic. Keywords Activity: Copy following keywords, explaining their meaning and translate them into Spanish. Command Algorithm Script Flow diagram GUI Event IDE duplicate Operator compile shrink Timer machine code Variable Scoreboard Bug Backdrop Random debug Sprite Grid Subroutine Tab Screenshot Mindmap of the unit Activity: Analize and try to understand following mindmap CPU are executed by Programming languages are written with T.P.R. 1st ESO. Unit 5: Programming INSTRUCTIONS consist of is created in a process: PROGRAM 7. 1.PROBLEM 2.IDEA 3. flow diagram 4. programming these 3 stages Scratch 5. compiling are done in a 6. Checking & debugging Integrated Development Environment e.g. MIT App inventor Autor: Guillermo Gómez 2

5.1. Programming basics Program, languages and IDE: A program is a collection of instructions that performs a specific task when executed by the CPU of a computer. A part of a program that performs a well-defined task is kwn as an algorithm; you may also find the names subroutine, procedure or subprogram. Programs are written in a programming language, which is human-readable. There are different programming languages, each of them with their own commands (vocabulary) and syntax (way of using commands). The computer only can directly execute instructions written in a special language, the machine code. The process of translating from a programming language into a machine code is called compiling. An Integrated Developmet Environment (IDE) is a program that allows to: 1. program with a programming language (human-readable form) 2. compile into machine code- (computer-executable form) 3. run the program 4. save the program Programming process: 1)Problem definition: Identify clearly the needs. 2) Search for ideas: Choose the right programming language and study the needed algorithms (variables, operations and formulas). 3) Design: Represent each algorithm with a flow diagram 4) Programming (IDE): write the program using the choosen language 5) Compiling (IDE). 6) Checking and debugging (IDE): run the program and if it doesn t meet the needs (problem definition) fix the errors (bugs). 7) Saving and sharing (IDE). 1 Problem definition 2 Search of ideas 3 Design (flow diagram) Flow diagram Symbols / conector Data input /output decision process I D E 4 Programming 5 Compiling 6 Checking and debugging 7 Saving and sharing Example: Calculate your T.P.R. final mark Read 4 marks: N (tebook) P (project) C (computer) E (exam) Mean = N*0,2 + P*0,15 + C*0,15 + E*0,5 E < 3 Mean < 5 Write: Mean Write: failed flow line Autor: Guillermo Gómez 3

Activity: Copy following exercises and solve them in your tebook 1) Explain what does the program designed in the flow diagram of page 3 do. 2) Design a flow diagram in which the user writes three califications and the program calculates the mean. 3) Design a flow diagram in which the user choose two two-digit numbers and the program adds them together. 4) Design a flow diagram in which the user writes two numbers and the program shows the biggest one. 5.2. Example of IDE: Scratch 5.2.1. Introduction Scratch is a new programming language based on a free IDE, that makes it easy to create your own interactive stories, games, and animations and share your creations with others on the web. 5.2.2. GUI (Interface) The interface consist of 4 bars: title menu tool screen mode Title bar Menu bar Script tab Costumes tab Sound tab Toolbar Stage Screen mode Start / Stop and 4 areas: commands tabs: scripts / costumes / sounds stage object panes Deping on the object selected on the panes (sprites or backdrops), the corresponding information will appear on the tabs. Commands Scripts area Stage backdrops Sprites pane Programming, checking and debugging The program blocks (commands) are dragged into the script area. Their shape indicates how they are assembled. When pressing the button the action takes place in the stage area, where you can check and decide if debugging is necessary. Autor: Guillermo Gómez 4

5.2.3. Example 1)Problem definition: It s about programming a game similar to the classic pacman: using the arrow keys to move, you have to guide a scissors within a maze to reach a rioter. 1.1) The scissors moves forward as long it is in contact with the maze s path 1.2) Whenever you push an arrow key, the scissors points in the direction you push 1.3) When the scissors reaches a rioter, a new rioter appears in ather part. 2) Search for ideas: 2.1) Stage: Design or import a backdrop that you like and add a continuous music. 2.2) Sprites: a) scissors, b) the maze with the rioter 2.3) Subroutines: a) the continuous music, b) to put the scissors in the ing point and make it move if it is in contact with maze path, c) to rotate the scissors with the keyboard, d) to change the rioter s position if touched by the scissors 3) Design: a: Music b2: Scissor movement play music till b1: Scissor appearance Show scissors open Scissors inside path move forward a stretch d: Rioter position c: Scissor direction Read direction key,,, point in direction 0º, 90º, 180º, 270º Wait a time period Show scissors closed Wait a time period reached by scissors Show next position Autor: Guillermo Gómez 5

4) Programming (IDE): 4.1) Stage: Import the background and the music, and program it to play continuosly (subroutine a) 4.2) Sprites: Design two costumes for the scissors, and at least two costumes of rioters appearing in different positions of the maze click to import the music click to import the background click to program Use the when green flag is clicked event to make play the music when the program s Use the control block forever to create a loop (part of a program that repeats itself continuosly) click to design the different costumes for the sprites 4.3) Subroutines for the sprites: program subroutine b and c for the scissors and subroutine d for the maze with the rioter. 5) Compiling (IDE). 6) Checking and debugging (IDE): Test, correct the errors and check that the program meets the requirements. Use the motion blocks go to and move to put the scissors in the ing point and make it move if it is in contact with maze path Use the motion blocks point in direction to rotate the scissors with the keyboard Use the control block forever if to change the position of the rioter (red color) each time it is touched by the scissors (black color) 7) Saving and sharing (IDE). Don t forget to shave the final program and if you want to share it you can do it through the IDE. Autor: Guillermo Gómez 6

Activity: Copy following exercises and solve them in your tebook 5) Program with Scratch the given example (Scissors rioter-game). 6) Improve the game: Design a new flow diagram for a subroutine in which the stage will show the time on a timer and a scoreboard with the number of times the scissors reaches the rioter. Improve the existing flow diagram so that it meets this new requirement; additionaly each time the rioter is reached by the scissors, he should shout through the speakers. 7) Add with Scratch the improvements designed in exercise 6. 8) Do the search-for-ideas step for following problem: programming a ping-pong game with following features: a. The program is designed for two players b. It will have a scoreboard. c. The game is over when one of the players gets four points. d. Each time the racquet hits the ball, there should be a popping sound. e. Once the game is finished the program declares the winner. 9) Design the flow diagrams for the ping-pong game. 10) Program with Scratch the ping-pong game. 5.3. Programming apps for mobile devices: MIT App inventor App Inventor is a IDE for designing mobile apps for the Android operating system. It was created by Google, but w the responsible for its support is the Massachusetts Institute of Techlogy (MIT). The programming is very similar to the one in Scratch. To get ed, just follow the instructions of the video: http://appinventor.mit.edu/explore/ai2/beginner-videos.html As a student of second grade, you probably have a mobile device,... but have you ever heard about mofobia? The term is an abbreviation for -mobile-phone phobia, a term describing the fear of being without a mobile device. Among today s high schools it s on the rise: more than two of three students sleep with or next to their smart phones! NOMOFOBIA Using mobile devices you can get an addiction that dictates your behavior! Although it is true that mobile devices make life easier and enables us to work more efficiently, don t forget that they should stay always as servants, never as masters. Notebook Autor: Guillermo Gómez 7