Chapter 13
Where to Go Next
From First Instructions to Complete Programs
At the beginning of this course, running two print() instructions was a real achievement. You had to learn what code was, where to put it, how to run it, and where its output appeared.
You just finished a multi-lesson interactive quiz engine.
That distance matters. It is easy to overlook progress when each lesson adds only one manageable idea.
You can work with values and data
You can:
distinguish
, integers, floating-point numbers, and ; store values in descriptive
; calculate new values;
build readable messages with
; inspect and transform text;
model ordered items with
; model labeled records with
; recognize the pairs supplied by dictionary
.items()and when a set’s unique values suit a need.
These are not isolated syntax facts. They let a program represent information.
You can control what a program does
You can:
choose paths with
, elif, andelse;combine and reverse
; through strings, lists, and dictionary records; repeat until a condition changes;
use
breakandcontinuedeliberately;validate input and recover from expected conversion failures.
These tools turn stored information into behavior.
You can organize and investigate
You can:
define
with ; to callers; keep local work inside a function;
compose several focused functions;
read
from the bottom; reproduce a bug with a small example;
inspect assumptions instead of guessing;
distinguish an optional missing
from a violated data contract.
You can also plan before coding:
describe the need and smallest useful
; write requirements that can be checked;
calculate examples independently;
choose edge cases;
record expectations with assertions;
write pseudocode;
refactor while protecting behavior.
Your capstone combines the course
The quiz engine uses:
a dictionary containing a list of question dictionaries;
string cleaning and comparison;
input validation with a retry loop;
functions with narrow responsibilities;
a loop and score accumulator;
returned Booleans and integers;
an entry point that remains testable;
normal, incorrect, cleaned, and empty-input test paths.
No single line is the accomplishment. The accomplishment is being able to explain how those pieces cooperate.
Fluency comes after first understanding
You may still look up punctuation,
The more useful measure is whether you can:
state what the program should do;
choose a small next step;
run it;
compare the result with an expectation;
investigate when they differ.
That process is a foundation you can keep using as programs become larger.
Which statement best describes how the quiz engine uses the course material?
What does this program print?
def count_long_words(words, minimum):
count = 0
for word in words:
if len(word) >= minimum:
count += 1
return count
items = ["tea", "coffee", "water"]
print(count_long_words(items, 5))