Program Function and Purpose MCQ Practice

Question 1 of 10

A program repeatedly reads temperature and displays "Heat on" when the value is below 18.

What is the most accurate purpose statement?

  1. A. To grade chemistry lab reports.
  2. B. To entertain users with random jokes.
  3. C. To help maintain a minimum temperature by signaling when heating should run.
  4. D. To count how many people enter a room.

Question 2 of 10

This fragment powers a museum audio button:

item ← INPUT()
IF item = "pottery"
{
    DISPLAY("Clay vessels from 200 BCE")
}
ELSE
{
    DISPLAY("No audio for that item")
}

A visitor enters sculpture. What is displayed, and what purpose does the fragment serve?

  1. A. Displays sculpture; purpose is to rename exhibits.
  2. B. Displays nothing; purpose is to delete the pottery record.
  3. C. Displays Clay vessels from 200 BCE; purpose is to play pottery audio only.
  4. D. Displays No audio for that item; purpose is to provide a short description when a known item code is entered, otherwise report missing audio.

Question 3 of 10

An e-book reader's purpose is to let users read purchased books offline. Which new feature most clearly advances that purpose?

  1. A. A download-and-open bookshelf that works in airplane mode for owned titles.
  2. B. A forced social feed that interrupts every page turn.
  3. C. A high score arcade mode unrelated to reading.
  4. D. A shop window that only streams previews while online and never stores chapters.

Question 4 of 10

Which scenario best illustrates identifying purpose by observing inputs and outputs rather than reading marketing text?

  1. A. Assuming two apps with blue themes share a purpose.
  2. B. Noticing that a "homework helper" only uploads files to a cloud folder with no feedback, so its real function is storage, not tutoring.
  3. C. Believing every slogan on an app store page without running the app.
  4. D. Counting the number of buttons on the home screen.

Question 5 of 10

A road-trip planner accepts start and end addresses and displays a route with estimated minutes.

Which is an output of the program?

  1. A. The start address typed by the user
  2. B. The end address typed by the user
  3. C. The displayed route and estimated minutes
  4. D. The user's decision to take a break

Question 6 of 10

A concert venue app's purpose is helping attendees find their seats. After a redesign, the home screen only sells merchandise.

What happened relative to purpose?

  1. A. Purpose automatically updates whenever UI colors change.
  2. B. Merchandise sales prove seating help improved.
  3. C. Programs cannot have purposes after redesigns.
  4. D. The visible function no longer aligns well with the stated seating purpose.

Question 7 of 10

A lab safety station runs this sequence when a spill button is pressed: light turns red, DISPLAY("Evacuate aisle"), and a pump starts.

Which statement best captures the program's purpose?

  1. A. To respond to a spill event by alerting people and activating cleanup hardware.
  2. B. To calculate average spill volume for marketing.
  3. C. To teach music theory through pump rhythms.
  4. D. To quietly log employee birthdays.

Question 8 of 10

Students claim a program that only stores encrypted passwords has the purpose of "helping users log in quickly with one tap."

Why is the claim weakly supported?

  1. A. Passwords cannot be inputs to any program.
  2. B. Encrypted storage alone does not show a one-tap login interaction or authentication flow outputs.
  3. C. Encrypted storage always includes one-tap login.
  4. D. Purpose statements never need evidence.

Question 9 of 10

Which pair is the best example of a statement (as part of a program) versus a program's purpose?

  1. A. Statement: the entire point-of-sale system; Purpose: a single assignment line
  2. B. Statement: user happiness; Purpose: a keyboard
  3. C. Statement: DISPLAY(total); Purpose: help a cashier show the amount due
  4. D. Statement: help a cashier; Purpose: DISPLAY(total)

Question 10 of 10

A community fridge app shows:

Screen Content
Home List of items expiring within 48 hours
Add Form to donate an item with quantity
Map Fridge locations open now
About Volunteer credits

Which purpose statement is best supported by the screens as a whole?

  1. A. To replace city voting machines.
  2. B. To grade chemistry titrations.
  3. C. To sell luxury groceries at marked-up prices.
  4. D. To help neighbors donate and find soon-to-expire shared food at open fridge sites.