The worksheetDownload the PDF
Answers

F12.4 Copyright and licences

Technology and society · GCSE · OCR J277 1.6.1, AQA 8525 3.8, Edexcel 1CP2 5.2.3 · about 15 min

BugBotLab

What this lesson is about

Proprietary and open source software, common licences, and Creative Commons.

Questions 5 marks in all

  1. [1 mark]What does open source mean?

    1. AThe source code is published and may be read, changed and shared
    2. BThe software is free of charge only
    3. CThe software has no licence
    4. DThe software is out of date
    Answer: A. Open source is about the licence and the code, not only the price.
  2. [1 mark]Give an advantage of proprietary software.

    1. AIt is usually supported and tested by the company
    2. BYou can change the source code
    3. CIt is always free
    4. DYou can share it freely
    Answer: A. Support and documentation are usual reasons to pay.
  3. [1 mark]What does a GPL licence require if you distribute your changes?

    1. AYou must release your version under the GPL too
    2. BYou must pay the author
    3. CYou must keep the changes secret
    4. DYou must apply for a patent
    Answer: A. This is called copyleft.
  4. [1 mark]What does CC BY mean for an image?

    1. AYou may use it if you credit the creator
    2. BYou may not use it
    3. CYou may use it only for schools
    4. DYou own it
    Answer: A. BY stands for attribution.
  5. [1 mark]Which is a disadvantage of open source for a school?

    1. ASupport may come from volunteers rather than a company
    2. BIt cannot be changed
    3. CIt is always expensive
    4. DIt has no source code
    Answer: A. Paid support is available for some projects, but it is not guaranteed.

The task: may I use it?

Write allowed(licence, use) that returns True or False for a proposed use, given LICENCES where each entry is (may change, may sell, must share changes). A use of "change" needs may change; "sell" needs may sell; "use as is" is always allowed. For each (licence, use) in requests, print <licence> / <use>: yes or : no. If the licence is not in LICENCES, print <licence> / <use>: unknown licence. At the end print allowed: <n> of <total>.

# the two lines every program starts with: the commands, then the robot
from bugbot import *
connect()

# licence: (may change, may sell, must share changes)
LICENCES = {"MIT": (True, True, False), "GPL": (True, True, True), "All rights reserved": (False, False, False)}
requests = [
    ("MIT", "change"),
    ("MIT", "sell"),
    ("GPL", "change"),
    ("All rights reserved", "change"),
    ("All rights reserved", "use as is"),
    ("CC BY", "sell"),
]

The hint students can ask for: If the licence is not in the table, say so. Otherwise look up what that licence allows and check it against the use asked for, remembering that using it unchanged is always allowed. Count the ones you allowed.

A solution

from bugbot import *
connect()
LICENCES = {"MIT": (True, True, False), "GPL": (True, True, True), "All rights reserved": (False, False, False)}
requests = [
    ("MIT", "change"),
    ("MIT", "sell"),
    ("GPL", "change"),
    ("All rights reserved", "change"),
    ("All rights reserved", "use as is"),
    ("CC BY", "sell"),
]

def allowed(licence, use):
    change, sell, share = LICENCES[licence]
    if use == "change":
        return change
    if use == "sell":
        return sell
    return True

yes = 0
for licence, use in requests:
    if licence not in LICENCES:
        print(f"{licence} / {use}: unknown licence")
    elif allowed(licence, use):
        yes = yes + 1
        print(f"{licence} / {use}: yes")
    else:
        print(f"{licence} / {use}: no")
print(f"allowed: {yes} of {len(requests)}")

Any program that meets the task's checks is marked correct in the simulator; this is one way, not the only way.