GCSE Computer Science€¦  · Web view2020. 3. 25. · U2L3: Sorting Algorithms. How does a...

Preview:

Citation preview

GCSE Computer Science

OCR

COMP2 REVISION WORKBOOKName:CLASS:

Mr Hubbard | COMPUTER SCIENCE

Table of ContentsUnit 1: Data & Logic....................................................................................................2

U1L1: Units..............................................................................................................3U1L2: Binary Numbers.............................................................................................4U1L3: Hexadecimal..................................................................................................5U1L4: Logic..............................................................................................................6U1L5: Characters.....................................................................................................7U1L6: Images...........................................................................................................8U1L7: Sound............................................................................................................9U1L8: Compression................................................................................................10

Unit 2: Algorithms.....................................................................................................11U2L1: Computational Thinking...............................................................................12U2L2: Searching Algorithms..................................................................................13U2L3: Sorting Algorithms.......................................................................................14U2L4: Writing Algorithms (using Pseudocode).......................................................15U2L5: Writing Algorithms (using Flowcharts).........................................................16U2L6: Interpreting, Correcting & Completing Algorithms......................................17

Unit 3: Programming.................................................................................................18U3L1: Programming Basics....................................................................................19U3L2: Sequence.....................................................................................................20U3L3: Selection......................................................................................................21U3L4: Iteration.......................................................................................................22U3L5: String Manipulation.....................................................................................23U3L6: Sub-Programs..............................................................................................24U3L7: File Handling................................................................................................25U3L8: Arrays..........................................................................................................26U3L9: SQL..............................................................................................................27U3L10: Defensive Design.......................................................................................28U3L11: Testing.......................................................................................................29U3L12: Translators.................................................................................................30

Unit 1: Data & LogicPaper 2: Computational Thinking, Algorithms & Programming

This section covers: 2.5 Computational Logic 2.6 Data Representation

U1L1: Units What is the smallest unit of data?

Why must data be converted into binary for a computer to process it?

Complete the following table:Name Size ExamplesBit (b)

Nibble

Byte (B)

Kilobyte (KB)

Megabyte (MB)

Gigabyte (GB)

Terabyte (TB)

Petabyte (PB)

To convert between units, we can use the following diagram:

Exam Questions1. Put these units in order of size: Gigabyte, Kilobyte, Nibble, Megabyte, Byte2. Where does the unit ‘bit’ originate from?

U1L2: Binary Numbers Converting Binary-Denary00110101

Converting Denary-Binary218

Adding Binary Integers00110011 + 01010101

Binary ShiftsShift 01001010 left two places

Shift 10110101 right three places

What is meant by ‘even parity’?

What is meant by ‘odd parity’?

U1L3: Hexadecimal Binary-Hexadecimal0101 1011

Denary-Hexadecimal199

Hexadecimal-Binary3E

Hexadecimal-Denary9B

Mid-Unit Review

U1L4: Logic AND OR NOT XOR

Q = ¬A v (B ^ C)

Q = ¬(A v B) ^ C

U1L5: Characters

What is a character?

What is a character set?

How are characters represented by a computer?

Describe the three character sets below.ASCII

Extended-ASCII

Unicode

U1L6: Images How are images represented by a computer?

What is metadata?

What is colour depth?

What is resolution?

Mid-Unit Review

U1L7: Sound How is sound represented by a computer?

Describe the process used to store sound in digital form.

What is meant by ‘sampling interval’?

What is meant by ‘sample size’?

What is meant by ‘bit rate’?

What is meant by ‘sampling frequency’?

U1L8: Compression Why is compression used?

What is meant by ‘lossy’ compression?

What is meant by ‘lossless’ compression?

Mid-Unit Review

Unit 2: AlgorithmsPaper 2: Computational Thinking, Algorithms & Programming

This section covers: 2.1 Algorithms

Computational Thinking, Searching, Sorting, Writing and Interpreting Algorithms

U2L1: Computational Thinking What is Computational Thinking?

What is Abstraction?

What is Decomposition?

What is Algorithmic Thinking?

Exam Questions1. A file uploading service won’t allow two files with the same file name to be

uploaded. If a file name already exists, it will ask the user to change the file name.

a. Describe, with examples, how abstraction can help decide how to compare the files.

b. Describe, with examples, how decomposition could be used to help program this task.

U2L2: Searching Algorithms What is a Binary Search?

What is a Linear Search?

U2L3: Sorting Algorithms How does a Bubble Sort work?

How does a Merge Sort work?

How does an Insertion Sort work?

U2L4: Writing Algorithms (using Pseudocode) This page is intentionally blank. You should use this to practice developing your algorithmic thinking skills, writing in pseudocode.

U2L5: Writing Algorithms (using Flowcharts) Draw and label the key flowchart symbols.

Draw a flowchart to check if a new username is valid. Usernames should be at least five characters long and unique. If it’s invalid, the algorithm should give the reason why and get the user to enter another username.

U2L6: Interpreting, Correcting & Completing Algorithms This page is intentionally blank. You should use this to practice developing your algorithmic thinking skills.

Unit 3: ProgrammingPaper 2: Computational Thinking, Algorithms & Programming

This section covers: 2.2 Programming Techniques 2.3 Producing Robust Programs 2.5 Translators and Facilities of Languages

U3L1: Programming Basics What is a variable?

What is a constant?

Identify the key operators in Python. What do they do?

What is an input?

What is an output?

What is meant by ‘assignment’?

Identify the main data types, providing examples for each.Data Type Description Example

Identify common arithmetic and Boolean operations.

U3L2: Sequence What is meant by the term ‘sequence’?

Write examples of sequenced Python programs below.

U3L3: Selection What is meant by the term ‘selection’?

Write examples of selection Python programs below.

U3L4: Iteration What is meant by the term ‘iteration’?

What is meant by a ‘count-controlled’ loop?

What is meant by a ‘condition-controlled’ loop?

Write examples of iterative Python programs below.

U3L5: String Manipulation What is meant by string manipulation?

What is concatenation?

Identify some of the key string manipulation commands below, writing them as Python programs.

U3L6: Sub-Programs What is a sub-program?

Why are sub-programs used?

What are the differences between a function and a procedure?

Write some sub-programs in Python below, including at least one function and procedure.

U3L7: File Handling What is file handling?

What are the key file handling commands?

Write some example Python programs using file handling below.

U3L8: Arrays What is an array?

Identify some operations that can be performed on an array.

Write some Python programs using arrays below.

U3L9: SQL What is a database?

What is SQL?

Create a database table below to store some student data.

Write some SQL commands to query this table, and show the output when this query is run.

U3L10: Defensive Design Why should programs be carefully designed?

What is input sanitisation?

What is input validation?

Why should we anticipate misuse?

What is authentication?

Identify some examples of authentication.

What is meant by ‘program maintainability’?

How can we maintain programs?

U3L11: Testing What is the purpose of testing?

What is iterative testing?

What is final testing?

What is a syntax error?

What is a logic error?

Draw a test plan to test a login system that uses a username and password.

U3L12: Translators What are the different levels of programming language?Type of Language Description

What is a translator?

What is an assembler?

What is a compiler?

What is an interpreter?

Identify features of an IDE that help with writing programs.

Python Knowledge Organiser

Pseudocode KeywordsPRINT INPUT OUTPUTNEXT WHILE ENDDO UNTIL IF

ELSE ELSEIF ENDIFGET REPEAT FOR

SELECT STORE SWITCHFUNCTION ENDFUNCTION PROCEDURE

ENDPROCEDURE WHERE ANDOR START STOP

ADD MULTIPLY DIVIDEMOD DIV SUBTRACT

*NB Not an exhaustive list

Recommended