cie-igcse-computer-science-0478-practical-znotes
cie-igcse-computer-science-0478-practical-znotes
TABLE OF CONTENTS
2
CHAPTER 1
3
CHAPTER 2
Programming
4 Databases
CHAPTER 3
PAGE 2 OF 5
CIE IGCSE COMPUTER SCIENCE//0478 Downloaded by Success Groups
CASE OF [VARIABLE]
OPTION: [CONSEQUENCE]
OTHERWISE: [CONSEQUENCE]
ENDCASE
CASE OF GRADE
GRADE>80: OUTPUT “A”
GRADE>70: OUTPUT “B”
GRADE>60: OUTPUT “C”
OTHERWISE: OUTPUT “FAIL”
ENDCASE
• Loop Structures:
o FOR…TO…NEXT- Will run for a determined/known
• Input & Output (READ & PRINT) – Used to receive and amount of times
display data to the user respectively
FOR [VARIABLE] [VALUE] TO [VALUE]
OUTPUT “ENTER NAME” [CODE]
INPUT NAME NEXT
OUTPUT “HELLO”, NAME
(ALTERNATIVELY) o REPEAT… UNTIL – Will run at least once till condition is
PRINT “ENTER NAME” satisfied; Verification is done after running code
READ NAME
PRINT “HELLO”, NAME REPEAT
[CODE]
• Assignment - Each variable is assigned using a left arrow. UNTIL [CONDITION]
WHILE [CONDITION] DO
• Conditional Statements: [CODE]
o IF…THEN…ELSE…ENDIF – 1 condition ENDWHILE
PAGE 3 OF 5
CIE IGCSE COMPUTER SCIENCE//0478 Downloaded by Success Groups
• Basic Data Types 3.2 Primary Key
o Integer – Whole Number e.g. 2; 8; 100 • It is a field that uniquely identifies each record. E.g.
o Real – Decimal Number e.g. 7.00; 5.64 Student code will be the primary key in a school
o Char – Single Character e.g. a; Y database.
o String – Multiple Characters (Text) e.g. ZNotes; COOL
o Boolean – Only 2 Values e.g. True/False; Yes/No; 0/1
• IMPORTANT CONCEPTS
o Sequence – Statements are executed in order. E.g.
Variables must first be declared, and then used. 3.3 Query-By-Example (QBE)
o Selection – Allows data items to be picked according to
given criteria. E.g. Finding the highest/smallest value
o Repetition – Causes statements to be repeated (loops)
o Totaling – Used with repetition, to keep the total
updated. E.g.
BillTotal BillTotal + ProductCost
o Counting – Used with repetition to increment the
counter by 1, each time the loop is repeated. E.g.
NumItems NumItems + 1
PAGE 4 OF 5
CIE IGCSE COMPUTER SCIENCE//0478 Downloaded by Success Groups
NUMBERS
Criteria Name Written As Function
Between Values in the range
Between
“x” and “y” between x and y
Less Than <x Values smaller than x
Less Than or Values smaller than or
<=x
Equal To equal to x
Greater Than >x Values larger than x
Greater Than Values larger than or equal
>=x
or Equal To to x
DATES
Criteria Name Written As Function
Between
“#mm/dd/yyyy#” Dates between the
Between
and specified dates
“#mm/dd/yyyy#”
Dates before a
Before < “#mm/dd/yyyy#”
certain date
Dates after a
After > “#mm/dd/yyyy#”
certain date
Records containing
Today =Date()
today’s date
Records containing
x Days Before
<=Date()-x dates x or more
Today
days in the past
PAGE 5 OF 5
Downloaded by Success Groups