Programming revision Revision tip: Focus on the things you find difficult first.

Slides:



Advertisements
Similar presentations
PROBLEM SOLVING TECHNIQUES
Advertisements

CHAPTER 2 GC101 Program’s algorithm 1. COMMUNICATING WITH A COMPUTER  Programming languages bridge the gap between human thought processes and computer.
CHAPTER 1: AN OVERVIEW OF COMPUTERS AND LOGIC. Objectives 2  Understand computer components and operations  Describe the steps involved in the programming.
Program Design and Development
Pseudocode and Algorithms
Programming Logic and Design, Introductory, Fourth Edition1 Understanding Computer Components and Operations (continued) A program must be free of syntax.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Chapter 2: Algorithm Discovery and Design
PRE-PROGRAMMING PHASE
Software. Task Time (minutes)  1. Complete self assessment sheet Read through the chapter on software Work through the questions on the.
Revision tip: Focus on the things you find difficult first.
ALGORITHMS AND FLOWCHARTS
Adapted from slides by Marie desJardins
CIS Computer Programming Logic
Networks & the internet. Revision tip: Focus on the things you find difficult first.
Chapter 2 - Algorithms and Design
By the end of this session you should be able to...
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 5: Software Design & Testing; Revision Session.
An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 5 Arrays.
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
An Introduction to Programming with C++ Sixth Edition Chapter 7 The Repetition Structure.
Chapter 2: General Problem Solving Concepts
1 Program Planning and Design Important stages before actual program is written.
Programming at a high level. Developing a Computer Program Programmer  Writes program in source code (VB or other language) Compiler  Converts source.
Hardware. Task Time (minutes)  1. Complete self assessment sheet Read through the chapter on hardware Work through the questions on the revision.
Databases. Revision tip: Focus on the things you find difficult first.
Algorithm Discovery and Design Objectives: Interpret pseudocode Write pseudocode, using the three types of operations: * sequential (steps in order written)
Algorithms and Pseudocode
Algorithms and Flowcharts
CHAPTER 2 GC101 Program’s algorithm 1. COMMUNICATING WITH A COMPUTER  Programming languages bridge the gap between human thought processes and computer.
7 - Programming 7J, K, L, M, N, O – Handling Data.
Component 1.6.
Lesson Objectives Aims To be able to write an algorithm in Pseudo Code
3.1 Fundamentals of algorithms
Topics Designing a Program Input, Processing, and Output
IGCSE 1 Cambridge Algorithms and flowcharts Unit 7 Computer Science
Component 1.6.
Chapter 2: Input, Processing, and Output
Programming Mehdi Bukhari.
Algorithms and Flowcharts
CHAPTER 5A Loop Structure
Pseudocode Upsorn Praphamontripong CS 1110 Introduction to Programming
Chapter 5: Control Structure
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
Algorithm and Ambiguity
Programming, Data & Testing
Creating Flowcharts AIM:
Chapter 1 Program Development
*current controlled assessment plans are unknown
ALGORITHMS AND FLOWCHARTS
Control Structure Senior Lecturer
Introduction to pseudocode
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
ALGORITHMS AND FLOWCHARTS
Algorithms Key Revision Points.
Algorithm and Ambiguity
Data and Flowcharts Session
Chapter 5: Control Structure
Language Constructs Construct means to build or put together. Language constructs refers to those parts which make up a high level programming language.
Data and Flowcharts Session
Flowcharts and Pseudo Code
Topics Designing a Program Input, Processing, and Output
Topics Designing a Program Input, Processing, and Output
Data and Flowcharts Session
Chapter 2: Input, Processing, and Output
Therapies. Interpreting and writing algorithms
WJEC GCSE Computer Science
Programming Logic and Design Eighth Edition
COMPUTING.
Presentation transcript:

Programming revision Revision tip: Focus on the things you find difficult first.

Task Time (minutes)  1. Complete self assessment sheet Read through the chapter on programming Work through the questions on the revision template focusing on weaker areas first Attempt the multiple choice test on Edmodo Attempt the past paper exam questions Mark past paper exam paper questions Read through the chapter on programming Attempt the multiple choice test on Edmodo again. 10 “Every lesson counts – don’t waste a minute.”

Flowcharts. 1. Draw a flowchart to describe the following process: Input 5 values Output their average (4 marks) 2. Draw a flowchart to describe the following process: Input radius for a circle. Check it is positive. Reject and ask for input if not positive. Output the circumference of the circle if positive. (4 marks) Exam tip: If you are asked to draw a flowchart try use the correct Symbols, but it is the logic that will be tested.

Pseudocode. 1.Write a pseudocode algorithm to describe how to get the information and output the area of a triangle. (3 marks) Exam tip: Always use indents to show loops and conditions when writing pseudocode. 2.Write the pseudocode to describe how to calculate the average of 10 numbers. (6 marks) Programming languages. Exam tip: You should be able to state the advantages / disadvnatges when asked to compare translators. 1.What are the main advantages of a high- level langauge over a low-level langauge? (4 marks) ……………………………………………………......…………………………………………………... ………………………………………………………...…………………………………………………… Compare an interpreter and a compiler for use by a student learning to program. (4 marks) ……………………………………………………......…………………………………………………... ………………………………………………………...…………………………………………………… What are the advantages of compiling code for commercial distribution? (4 marks) ……………………………………………………......…………………………………………………... ………………………………………………………...……………………………………………………

Integrated Development Environment (IDE) Exam tip: You should be able to identify the features of an IDE and explain how the features help a developer create a program more effectively. Control flow in imperative languages. Exam tip: You should be able to identify the three different types of control flow (sequence, selection, iteration) from a piece of Code. 1.Identify which control flow the following programs will use: (3 marks) (a) Deciding whether to give a discount to a customer for having a loyalty card. ……………………………………………………......…………………………………………………... (b) Inputting 10 numbers to be totalled. ……………………………………………………......…………………………………………………... (c) Setting up the computer when it is switched on. ……………………………………………………......…………………………………………………... 2.Write the pseudocode using a Repeat- until loop to output the first five square numbers. (2 marks) 3.Repeat question 2 but this time use a While-Endwhile loop. (3 marks) 1.What are the main features of an IDE? (4 marks) …………………………………………………… How do the features of an IDE help to create maintainable code? (4 marks) ……………………………………………………

Data types. 1.An online retailer keeps data about stock in their database. Items of stock are identified by a single letter, F for furniture, G for garden, P for pet, followed by a four digit number. They also store the quantity in stock, the retail price and whether there are more on order or not. Complete the information in this table. (3 marks) Exam tip: You will be expected to identify the most suitable data type for a variable. Remember telephone numbers and other numbers used purely for identification should be stored as strings. Variables & constants. Exam tip: Learn the definitions for the data types and for variables and for constants. 1.Constant VAT = 0.2 INPUT WholesalePrice RetailPrice = WholesalePrice + WholesalePrice * VAT OUTPUT RetailPrice In the code above: (a) Identify a constant. ……………………………………………………......…………………………………………………...(1 mark) (b) Identify the variables. ……………………………………………………......…………………………………………………...(1 mark) 2. Describe the difference between a variable and a constant.(2 marks) What is a variable?(2 marks) What data type will be used for RetailPrice and why?(2 marks)

Operations. Exam tip: Note if num1 ad num2 are integers, +, -, *, MOD and DIV will return integer values but / may not and the result could be a real number (float). Comparison operators. Operator priority. What value is stored in the variable result if: (6 marks) (a) Result = 7/2 ……………… (b) Result = 27 MOD 4 ……………… (c) Result = 36 MOD 6……………… (d) Result = 23 DIV 4……………… (e) Result = 36 DIV 6 ……………… What value is stored in the variable result if: (6 marks) (a) num1 > num2 if num1 = 7 and num2 = 5……………… (b) num1 <= num2 if num1 = 7 and num2 = 5……………… (c) num1 num2 if num1 = 7 and num2 = 5……………… (d) num1 num2 AND num 1 < num2 if num1 = 7 and num2 = (e) num1 num2 OR num1 = num2 if num1 = 7 and num2 = What value is stored in the variable result if: (6 marks) (a) Value = 17-3*4……………… (b) Value = (17-3)*4 ……………… (c) Value = 7*8/2……………… (d) Value = 7+8/4……………… (e) Value = 17 MOD ……………… (f) Value = 17 MOD (3+4)

Testing. Exam tip: You will be expected to identify the most suitable data type for a variable. Remember telephone numbers and other numbers used purely for identification should be stored as strings. 1. What is meant by a syntax error? Give an example.(2 marks) What is meant by a run-time errorr? Give an example.(2 marks) A = 3 B = 5 A + B = C The above code contains an error. What is the error and what type of error is it?(2 marks) INPUT customer INPUT cash IF customer = ‘yes’ AND cash > 50 THEN rate = 11 ELSE IF customer = ‘no’ AND cash < 50 THEN rate = 9 ELSE rate = 10 ENDIF OUTPUT cash * rate For the algorithm opposite state what the output will be for the following input values: (a) Customer = no, cash = (1 mark) (b) Customer = yes, cash = (1 mark) (c) Customer = yes, cash = (1 mark) (d) Customer = no, cash = (1 mark)

Past paper exam questions past paper.

Past paper answers past paper. Notes: What do I need to improve?

Past paper exam questions past paper.

Past paper exam questions past paper.

Past paper answers past paper. Notes: What do I need to improve?

Past paper answers past paper. Notes: What do I need to improve?

Past paper exam questions past paper.

Past paper exam questions past paper.

Past paper answers past paper. Notes: What do I need to improve?

Past paper answers past paper. Notes: What do I need to improve?