Problem solving T3 Writing and interpreting algorithms

AQA A-Level Computer Science


Writing and interpreting algorithms

Unit 2: Problem solving and theory of computation

  • Objectives:

    • To understand the term ‘algorithm’

    • To learn how to write and interpret algorithms using pseudocode


1 / 10
next
Slide 1: Slide
New lesson editorComputingFurther Education (Key Stage 5)

This lesson contains 10 slides, with interactive quizzes and text slides.

time-iconLesson duration is: 60 min

Items in this lesson

AQA A-Level Computer Science


Writing and interpreting algorithms

Unit 2: Problem solving and theory of computation

  • Objectives:

    • To understand the term ‘algorithm’

    • To learn how to write and interpret algorithms using pseudocode


Does TikTok know you better than your friends?

1

Yes

2

No

Why does your "For You" page feel so accurate?

It's not magic - it's rules.

Scenario


You are TikTok: decide what to show the user next.

Dave likes football, watches cat videos until the end, skips dancing videos and shares memes.

Write some rules to keep Dave on his feed.

For example; When the app is opened, play a meme.


Discuss

What happens when rules clash?


Can rules really represent a human?

Write some logic for TikTok, keep Dave on the app.

Some examples:

IF user_most_watch_retention == "cats":

opening_vid = find in list ("uploaded today". "cats")....


IF condition THEN action...


score = 0

if liked: score +=3......


Breaking the algorithm

A student watches ONE video about conspiracy theories....

Their whole feed changes.

Why did this happen?



Risks of this system

Beat TikTok

Trick the algorithm into thinking you love something you don't.

Write a strategy to fool the app.

You Now Have the Core Logic to Build TikTok!

Covered in today's session:

  • Unit 2 Problem Solving:

    • Topic 1 - Computational Thinking.

    • Topic 3 - Writing and Interpreting Algorithms.

  • Unit 6 Communications:

    • Topic 6 - Social, Legal and Cultural Issues.