Technology and society · GCSE · OCR J277 1.6.1, AQA 8525 3.8, Edexcel 1CP2 5.2.3 · about 15 min
The Computer Misuse Act 1990, the Data Protection Act 2018 and the Copyright, Designs and Patents Act 1988.
[1 mark]Guessing someone's password to read their email breaks which law?
[1 mark]Which word is central to the Computer Misuse Act?
[1 mark]Copying and selling someone else's program breaks which law?
[1 mark]How do you get copyright on a program you wrote?
[1 mark]A penetration tester attacks a company's systems with written permission. Is that an offence?
Write which_law(action) using the rules in the lesson: an action mentioning password, hack or malware is the Computer Misuse Act 1990; one mentioning personal or customer details is the Data Protection Act 2018; one mentioning copy or pirate is the Copyright, Designs and Patents Act 1988; anything else is no law matched. Check each action in actions, ignoring capital letters, and print <action>: <law>. At the end print unmatched: <n>.
# the two lines every program starts with: the commands, then the robot
from bugbot import *
connect()
actions = [
"Guessing a teacher's password",
"Selling customer details to an advertiser",
"Sharing a pirate copy of a game",
"Writing your own program",
"Installing malware on a school PC",
]The hint students can ask for: In which_law, lower the action then check the words in order: password/hack/malware, personal/customer details, copy/pirate. Count the ones that match no law.
from bugbot import *
connect()
actions = [
"Guessing a teacher's password",
"Selling customer details to an advertiser",
"Sharing a pirate copy of a game",
"Writing your own program",
"Installing malware on a school PC",
]
def which_law(action):
a = action.lower()
if "password" in a or "hack" in a or "malware" in a:
return "Computer Misuse Act 1990"
if "personal" in a or "customer details" in a:
return "Data Protection Act 2018"
if "copy" in a or "pirate" in a:
return "Copyright, Designs and Patents Act 1988"
return "no law matched"
unmatched = 0
for action in actions:
law = which_law(action)
if law == "no law matched":
unmatched = unmatched + 1
print(f"{action}: {law}")
print("unmatched:", unmatched)
Any program that meets the task's checks is marked correct in the simulator; this is one way, not the only way.