liveBook · Manning

Question set

As explained in Coding with AI

A question set is a grouped collection of questions assembled for a particular assessment or practice activity.

A question set is the selected group of questions assigned to one assessment session. For a practice test, it is built by choosing 35 random questions from the main question pool and recording each question’s link to the session. section 5.3.7 section 5.3.9

Figure 5.25 Our proposed database design that contains our sessions, question sets, and questions from the test
A black background with white text

Description automatically generated

The schema separates reusable questions, individual test sessions, and the rows that associate selected questions with each session. section 5.3.7

A minimal question-set workflow is:

  • Create a session and retain its generated session ID. section 5.3.9
  • Retrieve 35 questions from the question pool. section 5.3.9
  • Insert one question_sets row per selected question, storing its question ID alongside the session ID. section 5.3.9
  • Verify that the expected 35 rows are associated with the new session before building further behavior. section 5.3.10

Practice-test session

A newly created session starts with no answers recorded. Its question set then contains 35 randomly selected HAM radio questions associated with that session, allowing the application to present the same selection as the student proceeds through the test. section 5.3.10 section 6.0

Generated implementation needs review. Missing imports, an uncreated Questions instance, and an incompatible database-connection call caused failures before the question-set creation code ran; correcting those issues produced a working application. Keep the set tied to its session so the questions persist across test steps and browser interruptions. section 5.3.9 section 6.0

How Coding with AI covers it

How deep it goes
Works through table design, session-linked inserts, generated implementation, runtime errors, and database verification.
Examples
Uses a 35-question HAM radio practice test, SQL tables, Python session code, console errors, and database rows.
What you can do after
Build it from scratch by creating a session-linked table and inserting a random 35-question set.
How it connects
Connects test sessions, question pools, SQLite tables, random selection, and session persistence.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Coding with AI. The section links point to the parts of the book it draws on.