0% found this document useful (0 votes)
24 views17 pages

Grade 8 - EOS1 - Revision 1

Uploaded by

triet033214
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views17 pages

Grade 8 - EOS1 - Revision 1

Uploaded by

triet033214
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

REVISION PAPER – END OF SEMESTER 1 EXAM

GRADE 8 – COMPUTING

UNIT 1 – PROGRAMMING AND COMPUTATIONAL THINKING

Data Types – classification applied to a data item specifying which type of data that item
represent.

The data types are:

• String – a series of characters surrounded by quotation marks.


• Character – a single letter, digit or symbol
• Integer – a whole number
• Real – also known as float, this is a decimal number
• Boolean – True or False.

Using the example code below, decide whether each variable is a string, an integer or real
and the explain why it Is that data type.
Error Processing

Logic error
Error that allows a program to run but not output what is expected.

Syntax error
Error in program code that stops the program from running. e.g. missing a quotation mark or
spelling a function wrongly

Runtime error
Error that occurs while a program is running; the instructions cannot be completed.

Sequence
Order that program code needs to be in to work correctly.

Conditional statement
Code that includes a condition and will run diDerent code depending on whether the condition
evaluated (calculated) to equal TRUE ! Activity !
or FALSE.

StudentScoreChatbot.py (it contains errors!)


print ("Student score chatbot")
score = int(input("Enter your recent score: "))
if score >= 90:
print ("You are working at a Distinction level.")
print ("Keep the focus on new subject areas.")
elif score <=51 and <=89:
print ("You are working at a Merit level.")
print ("You are doing well. Focus on revision techniques.")
elif score >=20 and <=50:
print ("You are working at a Pass level.")
print ("Some extra sessions may help improve your understanding.")
else:
print ("You have not passed this assessment.")
print ("Some one-on-one time would help to look at content.")

Type of error What is the Error Correct Code


Below is the Python code for the problem that ask for the user to input his/her first name and
last name then display the words “Nice to know you, last name, first name. It will also ask the
user to enter a number. If the number is under 10, it displays the message “Too low”, if the
number is between 10 and 20, display “Correct”, otherwise display “Too high”.

There are syntax errors in the codes, identify what is the error and write the correct code beside
the boxes.

Errors Correct Code


A Python code for entering three (3) numbers is given below. The three numbers will be
an input from the user. Add together the first and second number and then multiply this
total by the third. Display the answer as “The answer is ...” . If the answer is more than
100 then display the message “That’s a high answer”. If the answer is exactly 100 then
display “That is exactly 100” other than that display “The answer is low”

Errors Correct Code


In Question above, look at the first three (3) lines of code. If these three lines of
codes are jumbled and order of codes were change such as below, do you think the
program will still work? Why or why not?

________________________________________________________________________________

________________________________________________________________________________

________________________________________________________________________________

________________________________________________________________________________

________________________________________________________________________________

________________________________________________________________________________

________________________________________________________________________________

________________________________________________________________________________

________________________________________________________________________________

________________________________________________________________________________
Python Codes

*** try the codes in : https://trinket.io/library/trinkets/create?lang=python3


Loop in a program is when something happens repeatedly. Iteration is another word for loop.

Iteration is a process where a set of instructions or structures are repeated in a sequence a


specified number of times or until a condition is met.

Example 1:

Ask the user to enter their name and then display their name three times.

Example 2:

Ask the user to enter a number between 1 and 12 and then display the multiplication table for
that number.

Arrays and List

An array holds multiple items under one name.

An array is a static data structure.

An array is fixed in size and can only contain data of the same type.

The contents can be changed, but items cannot be added or deleted.

The structure must remain fixed.


TRACE TABLES

Look at the Python program for a chatbot to identify how much money is left from a
shopping trip. Complete the trace table if the amount spent at the three shops was 126, 36
and 56.

Line Variable Variable Variable Variable Variable Variable Condition Outpu


t
TEST DATA and TEST PLAN

• It is important to test program with lots of diDerent types of data to make sure the program
works.

• It also checks that the program cannot be broken, for example, by entering something that
the program cannot use.

There are four types of test data:

• Normal

• Invalid

• Boundary

• Extreme
UNIT 2 – Computer System

Digital device - is piece of physical equipment that uses digital data.

Digital Assistant - An electronic device that can be used to help a user complete tasks such as
switching on other appliances, controlling heating systems, searching the internet for
information or organizing music playlist. (EXAMPLES : ALEXA, GOOGLE ASSISTANT, SIRI)

Hardware Is the physical components of the computer, such as CPU, hard disk, monitor,
keyboard and mouse.

Software Is the program that runs on a computer

Application Software - Software designed to do a particular task (like word processing, web
browser)

System Software - A software that manages all the hardware and application software
available in digital device.

Operating System

Acts as an interface between the computer hardware components and the user and provides a
platform where application can run.

Without the Operating System, the user would not be able to interact with the device and other
program cannot run. It has a number of key task:

• Manages the hardware of the device including the processor.


• Runs applications
• Provides interface for user to interact with the device
• Manages the storage and retrieval of files

System Software - Utility Programs

Utility Programs - Software that helps maintain the smooth functioning of a digital device by
helping the operating system manage task and resources.

Device Drivers - Software program that operates a hardware device connected to a computer.
Many devices now are known to be plug-and-play devices, meaning that the devices is
automatically detected and set up correctly for use by the OS.

Security Software - Any type of software that secures and protect a digital device Passwords,
PIN (Personal Identification Number), Biometric System such as fingerprints and facial
recognitions. May include firewalls, antivirus, anti-spyware, anti-malware

Disk Defragmenter - Reorganising files stored on a hard drive to ensure that all parts of the
same file is located one after the other on the drive.
Computer Programming Language

Unless a computer program is written in machine-code format, it needs to be translated into


machine code format, it needs to be translated into machine code before the processor can
execute it. A translator carries out this task. There are three diDerent types of translators.

FETCH-DECODE-EXECUTE

LOGIC CIRCUITS

All processing inside a digital device is carried out using logic circuits. Most logic gates accepts
two inputs. Logic gates can be represented using the followin g symbols:
Logic gates can be combined to represent conditional statements that have two or more
inputs to consider. Conditional statements. use conditional operators.
Exercise 1:

Draw logic circuits for the following Boolean Expressions:

X = NOT A AND (B OR C)

X = (A OR B) OR NOT C

Exercise 2:

Identify the Boolean Expression of the Logic Circuit:


ARTIFICAL INTELLIGENCE AND MACHINE LEARNING

Computer programs are needed to ensure that digital devices operate the way you expect them
to when you are using them. Many digital devices are able to make decisions or perform task that
they were not originally designed or programmed to do; this is made possible through machine
learning.

Machine Learning is found on many of the digital applications you use on a daily basis, such as:

• Internet search engines


• Email filters
• Online banking
• Biometric Security System

USES OF MACHINE LEARNING

• Speech input and language translations


• Self-driving cars
• Online Shopping and Banking
• Medicine
• Image Recognition
• Security
• Route Calculations
• Product Targeting
UNIT 3 – MANAGING DATA

LESSON 01 – SPREADSHEET

Cell Reference - A combination of letters and numbers used to identify cells in a spreadsheet
(example: A1, D3, C5)

Cell Range – collection of cells identified by the starting cell : closing cell (B2:D3)

Function – A block of code that is used to perform a single, related action.

Data – Raw information, values fact and figures.

Formula – A combination of numbers, mathematical symbols, cell references and functions


used to process data in a spreadsheet.

COUNT function - checks all the cells in a specified range in a spreadsheet and outputs how
many contain a numeric value. Format : =COUNT (B2:C6)

IF function – this evaluates (calculates) a condition and returns diDerent value depending on
whether it was TRUE or FALSE. Format =IF(C3>50, “Pass”,”Fail”)

MIN function – returns the lowest value in a specified range of cells in a spreadsheet. Format
=MIN(B2:C6)

MAX function - returns the highest value in a specified range of cells in a spreadsheet. Format
=MAX(B2:C6)
LESSON 2 – DATABASE

Data – Raw information, values, facts and figures.

Condition – something that is checked to determine whether it is true or false.

Database – A computer application that is used to organize data that can be stores, processed
and accessed electronically.

Primary Key – A value that is unique for every record in a database and can be used to identify a
record.

Characteristics of a Primary Key:

• A primary key must not only be numbers, but it should also be a combination of letters
and numbers.
• A primary key cannot be left blank in some records.

Examples of Primary Keys: Student ID, Book ID, Employee ID, License Plate Numbers.

Foreign Key – When the primary key from one table appears in another table to establish a link
between two entities

SQL (Structured Query Language) – Specialized language for accessing data in relational
database.

Query – A search for data in a database that meets specific rules or criteria.

Criteria – Set of rules that must be met.


LESSON 3 – BIG DATA

Big Data - Datasets that are too large or complex for traditional data-processing applications, e.g.
databases or spreadsheets, to process.

5Vs - The terms used to describe the concept of Big Data: volume, velocity, variety, value, veracity.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy