Presentation is loading. Please wait.

Presentation is loading. Please wait.

Book, Buddy, Internet, Teacher

Similar presentations


Presentation on theme: "Book, Buddy, Internet, Teacher"— Presentation transcript:

1 Book, Buddy, Internet, Teacher
Brain, Book, Buddy, Internet, Teacher F452 Programming Repetition – For Loops

2 Can you tell me The total weight The total Volume PREPARE TO LEARN
Taken from F452 Jan 2010 Q4 Can you tell me Know that iteration (repetition) is used to repeat sections of code. Understand why iteration is a key construct in programming. Be able to define and demonstrate a For loop. The total weight The total Volume PREPARE TO LEARN 01/01/2019

3 Lesson Objectives Iteration Repetition For Loops Count-Controlled Know that iteration (repetition) is used to repeat sections of code. Understand why iteration is a key construct in programming. Be able to define and demonstrate a For loop. Spec Link: a, b & d. Working on the Bubble Arrays programming problem. LEARNING OUTCOMES 01/01/2019

4 Iteration Can someone provide a definition for iteration? Wiki says.
Know that iteration (repetition) is used to repeat sections of code. Understand why iteration is a key construct in programming. Be able to define and demonstrate a For loop. Can someone provide a definition for iteration? Wiki says. Iteration means the act of repeating a process with the aim of approaching a desired goal, target or result. Each repetition of the process is also called an "iteration," and the results of one iteration are used as the starting point for the next iteration. Iteration is used to repeat sections of code. Why might iteration be useful in a program using arrays? NEW MATERIAL 01/01/2019

5 Iteration GOOD For I = 0 to 9 Score[i] + 10 Next i CONSTRUCT IDEAS
Know that iteration (repetition) is used to repeat sections of code. Understand why iteration is a key construct in programming. Be able to define and demonstrate a For loop. BAD Score[0] + 10 Score[1] + 10 Score[2] + 10 Score[3] + 10 Score[4] + 10 Score[5] + 10 Score[6] + 10 Score[7] + 10 Score[8] + 10 Score[9] + 10 GOOD For I = 0 to 9 Score[i] + 10 Next i ADVANTAGES Less Code == easier to read. More efficient || powerful More manageable && maintainable More extensible with new features From the code given can you develop code to add the last score to the current score. CONSTRUCT IDEAS 01/01/2019

6 Recording new knowledge
Know that iteration (repetition) is used to repeat sections of code. Understand why iteration is a key construct in programming. Be able to define and demonstrate a For loop. In a new blog post : Can you provide a definition for iteration. In your own words give reasons why iteration is a useful programming skill. Ask for a peer assessment of your work – can you improve this ‘revision’ quality definition? Can you compare your understanding with the information presented on the Java Docs For loop page. APPLY – MINI PLENARY 01/01/2019

7 Can you provide a definition?
Finding out facts Know that iteration (repetition) is used to repeat sections of code. Understand why iteration is a key construct in programming. Be able to define and demonstrate a For loop. Now develop your blog post further including information on For loops in Java. Can you provide a definition? Can you give examples of how you could/have used for loops in your code? How many alternative ways can you demonstrate? APPLY 01/01/2019

8 Assess your blog post definition on Count Controlled For Loops.
Blog Post Update Know that iteration (repetition) is used to repeat sections of code and why. Understand why iteration is a key construct in programming. Be able to define and demonstrate a For loop. Assess your blog post definition on Count Controlled For Loops. Have you mentioned: Count-Controlled Repeats a fixed number of times based on: Limit Increment Good for arrays or when number of repetitions is known in advance. REVIEW 01/01/2019


Download ppt "Book, Buddy, Internet, Teacher"

Similar presentations


Ads by Google