T4 computer science worksheet, Summaries of Computer science

T4 computer science worksheet computer science

Typology: Summaries

2025/2026

Uploaded on 06/15/2026

abdu-14
abdu-14 🇬🇧

2 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Worksheet 4 Flowcharts
Unit 6 Algorithms
Name:..................................................................................................... Class: ......................
Task 1
1. Draw a flow diagram for an algorithm which calculates how much money a student will need
per week to buy a meal and two drinks each weekday. The user should be prompted to
enter how much a meal costs, how much a drink costs, and then calculate and display the
total required.
✔️
1
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download T4 computer science worksheet and more Summaries Computer science in PDF only on Docsity!

Unit 6 Algorithms

Name: ..................................................................................................... Class: ......................

Task 1

  1. Draw a flow diagram for an algorithm which calculates how much money a student will need per week to buy a meal and two drinks each weekday. The user should be prompted to enter how much a meal costs, how much a drink costs, and then calculate and display the total required.

Unit 6 Algorithms

Unit 6 Algorithms

Unit 6 Algorithms

Task 2

Jasmine plays a game on her computer screen. A moving balloon appears on the screen, and she has to pop the balloon by clicking on it with the mouse. When the balloon is popped another one appears. The aim of the game is to pop as many balloons as possible in one minute.

The flow diagram for the game is shown below.

(a) Complete the statement at A.

(b) Complete the statement in B. (c) Complete the statement at C. (d) Complete the line and label at D. (e) Add a flowchart box at the bottom to display the player’s score.

E

B

C

D

No

Display new balloon

Display new balloon

Balloon^ Yes touched?

balloonScore = balloonScore + 1 ✔️

No

End

Start

Time < 60?

balloonScore = 0

Time = 0

A

Output balloonScore ✔️

Unit 6 Algorithms

Unit 6 Algorithms

Task 4

An amusement park operates a smartcard system for visitors. When they enter the park, a visitor chooses the amount they wish to put on their card. Rides cost differing amounts, and to get through a barrier for a particular ride, the visitor inserts their card. The balance on the card is checked. If there is enough money on the card, the balance is updated and displayed and the barrier opens. If there is not enough money left on the card, the current balance is displayed with a message “Not enough for this ride – need to top up”.

Complete the flowchart for the barriers in the amusement park.

Task 5

For each of the flowcharts in tasks 1-4, identify where sequence, selection and iteration have been used. Note that some of the flowcharts do not use all three of these.

Selection is used where a decision is made. ✔️

yes

no

Output “You don’t have enough cash”

Output balance

End

Open door

OUTPUT

balance

Show balance

Has enough for ride?

Insert card

Start