🌐 Unit 5: Software Engineering & Computing in Society — Practice Quiz

Assessment AS Learning — Self-Check
🔄 Not Graded — Unlimited Retakes
Purpose: Self-check on testing/debugging, version control, ethics, AI/ML, careers, history, and environmental impact. Instant feedback. Python 3.
Score: 0 / 12
Question 1 — Test design
A function divide(a, b) returns a/b. Which of the following is the BEST set of test cases?
Solution:
(b) covers normal, boundary (0 numerator), edge (0 denominator), and negative cases. (a) and (c) test only happy paths.
Question 2 — Git basics
What does git commit do?
Solution:
git commit records staged changes locally. git push sends them to the remote.
Question 3 — Debugging
A program correctly handles 99% of inputs but crashes on the empty list. What kind of bug is this?
Solution:
This is an edge-case bug. Most testing checklists insist on testing empty/zero/null inputs because they often expose missed assumptions.
Question 4 — AI / Machine Learning
Which best describes supervised machine learning?
Solution:
Supervised ML learns a mapping from labeled examples. The model's accuracy is empirical, not guaranteed.
Question 5 — Ethics
A hiring algorithm is found to reject more applicants from one neighbourhood than another, even when qualifications are comparable. This is an example of:
Solution:
Algorithmic bias — the system has internalized a pattern from biased training data or design choices, causing differential outcomes across groups.
Question 6 — History
Who is generally credited with writing the first algorithm intended for a machine (the Analytical Engine), in the 1840s?
Solution:
Ada Lovelace — her notes on Babbage's Analytical Engine include what is widely recognized as the first published algorithm.
Question 7 — Code review
Which is NOT a typical code-quality concern raised in a code review?
Solution:
Editor colour scheme is personal preference. (a), (b), (c) are real maintainability concerns.
Question 8 — Environmental impact
Roughly what fraction of global electricity demand is currently attributed to data centres (a typical figure used in the news as of the mid-2020s)?
Solution:
Estimates from the IEA put data-centre electricity at approximately 1-2% of global demand, growing rapidly with AI workloads. The exact figure is debated but the order of magnitude is robust.
Question 9 — Version control workflow
Which is the recommended workflow for working on a new feature in a team using Git?
Solution:
Branch → commit → PR → review → merge is the standard collaborative workflow. Direct edits to main risk breaking shared work.
Question 10 — Software Development Life Cycle
In the SDLC, which phase comes IMMEDIATELY after design?
Solution:
Typical SDLC: Requirements → Design → Implementation → Testing → Deployment → Maintenance.
Question 11 — Privacy
A free mobile game asks for permission to access your contacts and microphone, even though it is just a number-guessing game. The MOST appropriate response is:
Solution:
The principle of least privilege — software should request only the permissions needed for the feature in use.
Question 12 — Career exploration
Which postsecondary path is BEST suited to someone interested in building large-scale software systems used by many users?
Solution:
Computer Science or Software Engineering programs at any major Ontario university (Waterloo, U of T, McMaster, Western, Queens, etc.) are the most direct path. The other options are valuable but not focused on large-scale software development.