Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Use this notebook as a checkpoint, not a verdict

This self-check is meant to consolidate the Python fundamentals sequence. It gives you a quick way to see which ideas feel stable and which topics deserve another pass before you move on to data structures and algorithms.

Python Fundamentals Self-Check

A compact review of variables, conditions, loops, functions, modules, and debugging

Self-Check Quiz

Choose one answer for each question. You can still use the per-question Submit buttons for immediate feedback, then use Check total score at the end to count all marks at once.

1. Which Python concept stores a value with a name?

VariableCorrect. A variable stores a value under a name so you can reuse it later.
LoopA loop repeats instructions, but it does not name and store a value.
Importimport brings code in from another module.

2. Which statement helps a program choose between actions?

ifCorrect. if lets a program branch based on a condition.
printprint shows output, but it does not choose between branches.
defdef defines a function, not a branch.

3. Which construct repeats instructions across items or states?

LoopCorrect. Loops handle repeated processing.
TupleA tuple stores values, but it does not repeat instructions.
StringA string is data, not a repetition structure.

4. What do we call a reusable block of named logic?

FunctionCorrect. Functions package reusable behavior under a name.
DictionaryA dictionary stores key-value pairs, not reusable logic.
CommentComments explain code, but they do not run as logic.

5. What keyword is commonly used to bring code in from another module?

importCorrect. import brings definitions into the current file.
returnreturn sends a value back from a function.
classclass defines a class rather than importing code.

6. What practice checks whether code behaves as expected?

TestingCorrect. Testing verifies whether code matches expected behavior.
IndentationIndentation affects syntax structure, but it is not the checking practice itself.
AssignmentAssignment stores values in variables, but it does not validate behavior.
Check total score Reset self-check
Score interpretation

If you scored lower than expected, use that as a study map instead of a judgment.

  • revisit variables and data types if naming, values, or operators feel shaky

  • revisit control flow if choosing between branches still feels uncertain

  • revisit loops if repeated processing and accumulators still feel awkward

  • revisit functions and modules if reuse or imports still feel abstract

  • revisit testing and debugging if you are still guessing when code goes wrong

Practice Lab

Expected output
Python uses indentation for block structure -> True
A list is immutable -> False
Functions can return values -> True
Expected output
Items checked: 3
Extension idea

Add one more statement about loops, imports, or debugging and rerun the check to extend your own review set.

Guided Practice

Why is a deterministic self-check useful in a notebook?

It hides the logic from the learnerA good self-check should make reasoning clearer, not hide it.
It makes validation repeatableCorrect. Deterministic checks are easier to rerun and verify.
It removes the need for exercisesSelf-checks complement exercises, not replace them.
It only works for stringsDeterministic checks work with many data types.

Which statement about lists is correct?

Lists are immutableThat is false. Lists are mutable.
Lists are mutableCorrect. You can add, remove, or change elements in a list.
Lists can store only numbersLists can store many kinds of values.
Lists must always have equal-length stringsThere is no such restriction.

Key Takeaway

A short self-check cannot replace real practice, but it can quickly reveal whether the fundamentals are ready to support the next chapter. The next notebook sequence moves into data structures and algorithms.