Search for notes by fellow students, in your own course and all over the country.

Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.

My Basket

You have nothing in your shopping cart yet.

Title: IB Computer Science HL Topic 4 Notes
Description: Notes for IB Comp Sci Topic 4.

Document Preview

Extracts from the notes are below, to see the PDF you'll receive please use the links above



be changed during normal execution of the program and the value is variable
...


4
...
7 Define the operators =, ≠,
<, <=, >, >=, mod, div
...
The value is constant
...

An operator is a character/set of characters that represents an action
...

Arithmetic operators (+, -, div, mod) for doing simple mathematical calculations
...

Equality & Relational operators (<, >, >=, <=, ==, !=,
...


Arithmetic operator
+ is used for adding two numbers (also used for String concatenation)
- is used for subtractions
* is used for multiplication
mod: returns the remainder of a division calculation
div: returns the numbers of times X divides into Y without a remainder
/ is used for division in OOP (but cannot be used in Pseudocode)
% is used for mod in OOP (but cannot be used in Pseudocode)
Unary operators
++ : Increment operator; increments a value by 1
I++ : is the same as I = I + 1
-- : Decrement operator; decrements a value by 1
I-- : is the same as I = I -1
Equality and Relational Operators
== : Equal to (only for non-Strings!)
!= or ≠ : Not equal to
> : Greater than
>= : Greater than or equal to
< : Less than
<= : Less than or equal to

4
...
8 Analyse the use of
variables, constants and
operators in algorithms
...
25 and why is an operator required?
When should a variable be used?
Variables should be used when the value of something
needs to be changed
...

When should operators be used?
Operators should be used when the value of a variable
needs to be changed
...
3
...

Construct algorithms using looping and branching
NUM = 5
if num < 3
then output "under 3"
else i
4
...
10 Describe the
characteristics and applications
of a collection
...

of the same type
size is variable
Applications of lists:
The order of elements in a collection is typically not
- Useful for group of items when you don’t know how many items you’ll be
known
needing/using (contrast to arrays where the size is set in stone at creation)
If you don't know the order of elements then you need to
- Because the collection is only as big as you need it to be, it is an efficient use of RAM
store them in a variable size data structure
...

- Can be of any data type (primitive or even your own object)
List is a type of collection
Topic 4 Page 22

List is a type of collection
4
...
11 Construct algorithms
using the access methods of a
collection
...
3
...


A sub-program is a set of computer instructions that perform a specific and predefined
task
...
This is
Title: IB Computer Science HL Topic 4 Notes
Description: Notes for IB Comp Sci Topic 4.