+ All Categories
Home > Documents > Unit 6: Programmingtechnotpr1.weebly.com/uploads/1/1/0/4/110446503/... · 4. The following...

Unit 6: Programmingtechnotpr1.weebly.com/uploads/1/1/0/4/110446503/... · 4. The following...

Date post: 11-May-2020
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
12
Transcript
Page 1: Unit 6: Programmingtechnotpr1.weebly.com/uploads/1/1/0/4/110446503/... · 4. The following flowchart gives the steps followed to add 2 numbers (3+2=5). Redo the flowchart with the
Page 2: Unit 6: Programmingtechnotpr1.weebly.com/uploads/1/1/0/4/110446503/... · 4. The following flowchart gives the steps followed to add 2 numbers (3+2=5). Redo the flowchart with the

2/12

Unit 6: Programming

Contents:

• Programming block (Scratch)

• Applications for mobile devices (App Inventor)

tablet smart phone Google account

Page 3: Unit 6: Programmingtechnotpr1.weebly.com/uploads/1/1/0/4/110446503/... · 4. The following flowchart gives the steps followed to add 2 numbers (3+2=5). Redo the flowchart with the

3/12

1. Introduction to Programming.

a) Look at the pictures below which describe the way of drawing a square. Follow the

steps (instructions) and draw a square with a pencil (1 step is 1 grid); then write the

instructions.

INSTRUCTIONS

STEP 01 Start 

STEP 02 

STEP 03 Move forward 10 steps 

STEP 04 

STEP 05 

STEP 06 

STEP 07 

STEP 08 Change direction to east (E) 

STEP 09 

STEP 10 End 

b) Redo the instructions to draw the following figures:

What changes?

STEPS 03,05,07,09 

Move forward __ steps

STEP 02 

STEP 03 

STEP 04 

STEP 05 

STEP 06 

STEP 07 

STEP 08 

STEP 09 

Page 4: Unit 6: Programmingtechnotpr1.weebly.com/uploads/1/1/0/4/110446503/... · 4. The following flowchart gives the steps followed to add 2 numbers (3+2=5). Redo the flowchart with the

4/12

2. The figure below (a flow chart) shows the steps of the technological process.

a) Complete the flowchart on the right with the steps:

flowchart steps flowchart (on the right)

b) When we test the model we are checking if the model (of the solution) works or not.

And so we can ask: does the model work? We have to decide whether we continue to the

next step (it works) or we go back to a previous step (it does not work properly). Redo

(twice) the flowchart to show the following options: 1 (we had a problem when building the

model) and 2 (we didn’t select the best solution)

decision making step A problem with the construction A problem with the solution

Page 5: Unit 6: Programmingtechnotpr1.weebly.com/uploads/1/1/0/4/110446503/... · 4. The following flowchart gives the steps followed to add 2 numbers (3+2=5). Redo the flowchart with the

5/12

3. The following flowchart classifies animals as herbivore or carnivore. Answer the

questions about the flowchart:

What problem does this flowchart solve? It solves the

problem of ___________________ of animals into 2 groups:

___________________ and ___________________.

Read…. Is it an input ( ) or an output ( )?

Print… Is it an input ( ) or an output ( )?

Circle the element which represents the decision

making step.

If the input is a lion, what is the output?

If the input is a zebra, what is the output?

4. The following flowchart gives the steps followed to add 2 numbers (3+2=5). Redo the

flowchart with the symbols as needed (according to what is necessary):

What are the inputs?

What is the output?

What is the process?

Suppose this flowchart is running on a computer:

• What input device would you use to enter A&B?

• What output device would you use to get the

result?

Page 6: Unit 6: Programmingtechnotpr1.weebly.com/uploads/1/1/0/4/110446503/... · 4. The following flowchart gives the steps followed to add 2 numbers (3+2=5). Redo the flowchart with the

6/12

5. HIGHLEVEL Study the flowchart below and answer the questions.

• Give me a number (between 1 and 99): N1=

• Give me another number (between 1 and 99): N2=

• Is N1 ( ) less than N2 ( )? Yes No (circle the answer)

• Write: and we finish.

• So, we have to ask if N1 ( ) is grater than N2 ( ) Yes No

• Write: and we finish.

• Write: and we finish.

• What are the inputs ( ) in this flowchart? The variables ___ and ___ .

• What are the outputs ( ) in this flowchart? The phrases read…, and the 3 possible

results: N1 _______________ N2, N1 _______________ N2 and N1 _______________ N2.

Page 7: Unit 6: Programmingtechnotpr1.weebly.com/uploads/1/1/0/4/110446503/... · 4. The following flowchart gives the steps followed to add 2 numbers (3+2=5). Redo the flowchart with the

7/12

6. What is a program? A program consists of the step-by-step instructions that tell

the computer how to do its work (to perform a task). You write these instructions using a

programming language, like Scratch or App Inventor.

• Indicate here the values of each variable:

Variable number A: Variable number B: Variable result (Sum):

The figure below shows this program written with Scratch. Relate each element of the

flowchart with the instructions in Scratch (2 of them are already done):

• What is the input data ( ) in this program? The numbers ___ and ___.

• What is the out data ( ) in this program? The _______________.

7. Scratch. Scratch is visual programming environment designed at MIT to introduce

some basic programming concepts. With Scratch, you can create a wide variety of

Page 8: Unit 6: Programmingtechnotpr1.weebly.com/uploads/1/1/0/4/110446503/... · 4. The following flowchart gives the steps followed to add 2 numbers (3+2=5). Redo the flowchart with the

8/12

interactive media projects (animations, games, stories and art works) and share those

projects with others in an online community. In MIT’s Scratch, the programmer can create

their own graphical objects, including the stage background on which the action of a

Scratch program happens, and a number of moving objects (sprites) such as the

characters in an animation or game.

Practising with Scratch:

• Draw the result of program_01 below (1 step is 1 mm.) using a pencil ( and

). means going from one position to another following a straight line.

Execute (run) program_02 and draw its result:

Page 9: Unit 6: Programmingtechnotpr1.weebly.com/uploads/1/1/0/4/110446503/... · 4. The following flowchart gives the steps followed to add 2 numbers (3+2=5). Redo the flowchart with the

9/12

Change the values in program_01 and program_02 to draw the figures below

8. HIGHLEVEL More about Scratch. Read the following text; then label the pictures

below with one of the words in bold from the text.

Scratch projects are made up of objects called sprites.

You can change how a sprite looks by giving it a different costume (dress, uniform). You

can use any image as a costume by drawing it in the Paint Editor, import an image from

your hard disk, or drag in an image from a website.

You can give instructions (commands) to a sprite, telling it to move or play music by

snapping together (pasting one after the other) graphic

blocks into stacks (piles), called scripts (the programs you create).

Drag the instructions (graphic blocks) from Blocks Palette

and drop them in the Scripts Area to write a program. When you click on a script, Scratch

runs (executes) the blocks from the top of the script to the bottom.

The area where the Sprite moves is called the stage. The computer follows the step by

step instructions to give the output (the result). This is called running or execution of a

program.

Page 10: Unit 6: Programmingtechnotpr1.weebly.com/uploads/1/1/0/4/110446503/... · 4. The following flowchart gives the steps followed to add 2 numbers (3+2=5). Redo the flowchart with the

10/12

instructions blocks

9. App Inventor is a visual, drag-and-drop tool (application: app)

for building (creating) mobile apps on the Android platform.

An app is a computer program—a list of instructions that tells a computer what to do.

We usually use the word app to talk about programs written for any mobile Android device

such as a smart phone or a tablet.

Android is an operating system (OS) that runs on lots of mobile devices. An OS

manages a computer’s hardware (cameras, touch screens, speakers…). Windows, Mac OS,

and Linux are OS that are mainly used in desktop and laptop computers.

• Label the pictures below with one word (in bold) taken from the text above.

Page 11: Unit 6: Programmingtechnotpr1.weebly.com/uploads/1/1/0/4/110446503/... · 4. The following flowchart gives the steps followed to add 2 numbers (3+2=5). Redo the flowchart with the

11/12

10. What we need to create apps using App Inventor (label the pictures with the words

in bold).

A computer running Windows, Mac OS X, or Linux.

A web browser: Firefox, Chrome, or Safari (Internet Explorer doesn’t work).

An Android device (phone, tablet) is not essential, but it makes things a lot more fun!

A wireless internet connection or USB lead from your phone to your computer is

required too.

A Google account.

To go to App Inventor on the web (http://ai2.appinventor.mit.edu)

Page 12: Unit 6: Programmingtechnotpr1.weebly.com/uploads/1/1/0/4/110446503/... · 4. The following flowchart gives the steps followed to add 2 numbers (3+2=5). Redo the flowchart with the

12/12

11. You will use the following three steps to build your App Inventor apps:

1: Design the app screen by using the app Designer (components for your app).

2: Tell the app what to do by programming the Blocks Editor (where you assemble

blocks that specify how the components should behave).

3: Test the program using your phone or emulator. Your app appears on the phone step-

by-step as you add pieces to it, so you can test your work as you build. If you don't have an

Android phone, you can build your apps using the Android emulator (software that runs on

your computer and behaves just like the phone).

• Label the pictures below with the steps you have to follow to create an app: 1 Designing

the app screen, 2 Telling the app what to do and 3 Testing the program


Recommended