/
An Introduction to Programming An Introduction to Programming

An Introduction to Programming - PowerPoint Presentation

pamella-moone
pamella-moone . @pamella-moone
Follow
402 views
Uploaded On 2016-05-31

An Introduction to Programming - PPT Presentation

WITH PSEUDOCODE Created by PJones 2014 A computer is a blank canvas Waiting for you to instruct Plan out with pseudocode Then program to construct Written by PJones 2014 Created by PJones 2014 ID: 343284

created pseudocode 2014 jones pseudocode created jones 2014 move algorithm words key squares minion abcd1234 game question banana sequence stuart actions instructions

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "An Introduction to Programming" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

An Introduction to Programming

WITH PSEUDOCODE

Created by P.Jones 2014Slide2

A computer is a blank canvas

Waiting for you to instruct.

Plan out with pseudocode

Then program to construct.

Written by P.Jones 2014

Created by P.Jones 2014Slide3

How does the game know to break this?

How does the game know this will destroy?

How does the game make Mario grow?

How does the game know to collect these?

How does the game know to walk on this?

Created by P.Jones 2014Slide4

Created by P.Jones 2014Slide5

How do I get Minion Stuart to move to D1?

A

B

C

D

1

2

3

4

Move right 3 squares

Created by P.Jones 2014Slide6

How do I get Minion Stuart to move to D1 then to D4?

A

B

C

D

1

2

3

4

Move right 3 squares

Move down 3 squares

Created by P.Jones 2014Slide7

How do I get Minion Stuart to move to D1 then to D4, then move to A4 and finally to A1?

A

B

C

D

1

2

3

4

Move right 3 squares

Move down 3 squares

Move left 3 squares

Move up 3 squares

Created by P.Jones 2014Slide8

What have we just done

You have created a series of instructions to solve a given problem

This is called an

Algorithm

When we write it in a list of instructions it is called Pseudocode Computer Programmers use pseudocode to help plan out the code they will need. For game makingCreating websitesControl software – robots / machineryANYTHING where planning is needed = pseudocode is used to layout the tasks/actions

Key words = Pseudocode and Algorithm

Created by P.Jones 2014Slide9

Learning Objectives

Identify the sequence of actions to solve a problem

Determine the order of a sequence to correctly solve a problem

Demonstrate the use of pseudocode to solve a problem

Key words = Pseudocode and Algorithm

Created by P.Jones 2014Slide10

Levels

Level 3

– Plan a sequence of instructions and present the sequence in a list

Level 4

– Think through the algorithm and use pseudocode to plan this out allowing the final format to be read easily before programmingLevel 5 – Analyse and present the algorithm for the task, refine the sequence by adding the IF question.Reflect on the pseudocode created to better prepare for future tasks. Level 6 – Independently wrote the pseudocode for moving the minion around the board collecting bananas and not apples, using IF appropriately

.Level 7 – Be able to test the different pseudocode created, with peer assessment as you are developing them, reflect on the results and then improve them

Key words = Pseudocode and Algorithm

Created by P.Jones 2014Slide11

Using Pseudocode

Pseudocode can be used to help layout the code

WORKBOOK TASK 1

What is the sequence of events to create a square?

You have a selection of instructions can you order them with the person next to youNow write the list of instructions in your workbooks

Key words = Pseudocode and Algorithm

Created by P.Jones 2014Slide12

Algorithm Solution written in pseudocode

Move forward 100

Turn right 90 degrees

Move forward 100

Turn right 90 degreesMove forward 100Turn right 90 degreesMove forward 100Turn right 90 degrees

Created by P.Jones 2014Slide13

CHECKPOINT

What have we done so far?

Created an series of actions to solve a given problem.

This is called an

Algorithm

Written the list of actions in a numbered sequence

This is called Pseudocode

Key words = Pseudocode and Algorithm

Created by P.Jones 2014Slide14

Your Turn

A

B

C

D

1

2

3

4

In your workbooks I want you to think about how to get Minion Stuart to move around the squares and collect the bananas. You will need to move him and also add actions needed to pick up the items.

Extension = Can you add a ‘question to say if the minion reaches a banana?

Key words = Pseudocode and Algorithm

Created by P.Jones 2014Slide15

A

B

C

D

1

2

3

4

Key words = Pseudocode and Algorithm

Move right 2 squares

Pick up banana

Move right 1 square

Move down 1 square

Pick up banana

Move left 2 squares

Pick up banana

Move down 1 square

Move right 1 square

Pick up banana

Move down 1 square

Move left 2 squares

Pick up banana

Algorithm Solution written in pseudocode

Created by P.Jones 2014Slide16

Can you ask a question?

When we think about the way Minion Stuart moves across could we ask a question as he moves from one side to the other?

Move across 3 squares

If you reach a banana

Pick it up

Ask the question – try and start it with an ‘IF’

Ask the question – try and start it with an ‘IF’

Created by P.Jones 2014Slide17

Can we ask a question?

A

B

C

D

1

2

3

4

Key words = Pseudocode and Algorithm

Created by P.Jones 2014Slide18

Possible algorithm in pseudocode

A

B

C

D

1

2

3

4

Key words = Pseudocode and Algorithm

Move right 3 squares

IF Minion reaches a banana

THEN pick it up

IF Minion reaches an apple

THEN leave it

This would continue to cover the whole board

This form of pseudocode would help a game designer plan out the code they would need to write to create it.

Created by P.Jones 2014Slide19

Finally

Can you tell me in your own words what pseudocode is

?

Please complete the self assessment task in your workbooks

Thank

you from

Mrs Jones

Key words = Pseudocode and Algorithm

Created by P.Jones 2014