Topics 2, 3, 4, 5, 6, 7 and Option D will be assessed.

The exam is two hours and will be 100 marks (60 marks for 2, 3, 4, 5, 6, 7, and 40 marks for Java).

# Recursion practice

Recursion is a common topic on the new syllabus and it has feature in every exam since 2014. To get you to think about recursion, here are some simple tasks.

Write the following recursive functions (in Java because the IB’s pseudocode doesn’t have a return statement – doh!):

• A function that takes an int array argument and returns the maximum int in the list.
• A function that takes a string and returns true if it is a palindrome.
• A binary search function to find an int n in an int array.
• A function that takes an int n and return n factorial.
• A function that takes an in n and returns the nth Fibonacci number.
• A function that takes an int n and prints the Fibonacci sequence up to n.
• A routine in Logo or Python that creates a Koch snowflake.
• A routine in Logo or Python that creates a Sierpinski triangle.

Look at the following Python code. The “left”, “right” and “forward” commands are just like there are in Logo. Sketch the pattern that the following calls will make:

```koch(t, 0, 100)
koch(t, 1, 100)
koch(t, 2, 100)```
```import turtle

def koch(t, order, size):
if order == 0:
t.forward(size)
else:
koch(t, order-1, size/3)
t.left(60)
koch(t, order-1, size/3)
t.right(120)
koch(t, order-1, size/3)
t.left(60)
koch(t, order-1, size/3)

# EXECUTION STARTS HERE
t = turtle.Turtle()
koch(t, 3, 300)
```

# Junior Application Development

Deliverables to be put on your website:

• Video 1-2 minutes
• Annotated screenshots and code
• What each class does
• How classes communicate with each other (specifically what references are passed from where to where)
• How saving to file works
• How subforms work

# New IA submission form for 2016

Seniors: You each need to fill one of these out in addition to the normal submission procedures that I have outlined.

OCC_d_4_comsc_form_1605_2_e

# Upcoming assessments in IB1 and IB2

Monday February 1st is a busy day!

Seniors need to hand in their final draft submission for their IA. This means 5 PDF files (Criteria A-E) and a video of 2-7 minutes in length. This should be put into a folder called “IA Final Draft” in your shared folders.

Juniors have quizzes:

# Topic 2 Quiz

There will be a quiz on all aspects of Topic 2 on Monday 18th January.

You must use IB Computer Science Guide (first exams 2014) as your reference for content.

We will cover logic gates and truth tables on Thursday.

Suggested revision technique:

• For each syllabus point:
• If the content is on Google presentation that I have given you, learn it.
• If not, make a note of it and ask me on Thursday 14th, or alternatively research it yourself.
• Consider
• Definitions