Exercise 1: Classifying Discrete vs. Continuous Quantities — Possible Solution ==================================================================== (a) THE NUMBER OF USERS CURRENTLY LOGGED IN — DISCRETE ------------------------------ At any given moment, there is a specific whole number of logged-in users - 0, 1, 2, 3, and so on. There's no meaningful sense in which "7.3 users" could be logged in. Per this chapter's own definition, discrete values are "distinct, separate, countable - you can list them one by one," which is exactly what a user count is. (b) THE EXACT CPU TEMPERATURE AT A GIVEN INSTANT — CONTINUOUS ------------------------------ Temperature is a physical quantity that varies smoothly - between any two temperature readings, arbitrarily many intermediate values exist (45.10°C, 45.101°C, 45.1001°C, and so on without any natural stopping point). This matches the chapter's own definition of continuous values: "between any two values, infinitely many more exist." That a sensor eventually reports a rounded reading is a limitation of measurement, not a property of temperature itself. (c) THE NUMBER OF ROWS RETURNED BY A SQL QUERY — DISCRETE ------------------------------ A result set contains a specific whole number of rows - 0, 1, 100, or however many actually matched. Rows can't exist in fractional quantities; you can list them one by one, exactly matching the chapter's own definition of discrete. (d) THE AMOUNT OF TIME A FUNCTION TOOK TO EXECUTE — CONTINUOUS ------------------------------ Execution time is fundamentally a measurement of duration, which - like temperature - can, in principle, take any value along a continuous range (12.4ms, 12.41ms, 12.403ms, and so on). That a computer's clock has finite resolution and eventually rounds the measurement doesn't change what kind of quantity time actually is; it's continuous by nature, discrete only in how it happens to get measured. WHY THIS WORKS AS AN ANSWER ------------------------------ Each classification is justified directly against the chapter's own definitions - discrete quantities are countable and listable one by one; continuous quantities allow infinitely many intermediate values between any two points. Two examples (user count, row count) are naturally whole-number quantities with no meaningful fractional values; two examples (temperature, execution time) are physical measurements that vary smoothly, even though real-world sensors and clocks report them with finite precision.