How to use this deck

This deck focuses on concepts that recur across introductory programming courses. The code-specific cards use Python syntax; the underlying ideas, such as variables, functions and search complexity, apply across many languages. If your course uses another language, translate the syntax rather than memorising Python as a universal rule.

Work through the cards in order. Read the question, say or write an answer from memory, then reveal the answer. Choose Again if you could not retrieve it, Hard if you needed substantial effort, Good if your answer was correct, or Easy if it was immediate and precise. Grade the answer you actually gave, not the one you wish you had given.

A MySummaries deck on programming fundamentals looks like this:

Cards — Programming Fundamentals18 due

In a program, what does a variable name refer to?

A name bound to a value; the name can be used to access that value.

All 18 cards
In a program, what does a variable name refer to?A name bound to a value; the name can be used to access that value.
In Python, what is the difference between = and ==?= assigns a value; == compares two values for equality.
What does a data type describe?The kind of value and the operations that are meaningful for it, such as integer arithmetic or string concatenation.
What are the two Boolean values in Python?True and False.
What does an if statement do?It runs a block when its condition is true and can select an alternative block when the condition is false.
In Python, what values does range(2, 5) produce?2, 3 and 4; the stop value 5 is excluded.
What must eventually happen for a while loop to stop?Its condition must become false, or execution must leave the loop another way, such as with break.
In a function definition, what is a parameter?A named input in the function definition; an argument is the value supplied when the function is called.
What is the difference between return and print in a function?return sends a value back to the caller; print displays text or a value as output.
In Python, where can a local variable normally be accessed?Inside the function where it is assigned, unless it is explicitly made available outside that local scope.
What is the index of the first item in a Python list?0.
What does it mean that a Python list is mutable?Its contents can be changed after the list is created, for example by replacing an item.
What does a dictionary store in Python?Key-value associations; a key is used to look up its associated value.
What is the worst-case time complexity of scanning an unsorted list with linear search?O(n), because the search may examine every one of the n items.
What precondition does binary search need to discard half the search range at each step?The items must be sorted according to the comparison used by the search.
If two loops each run n times, one nested inside the other, what is the usual time complexity?O(n²), assuming the loop bodies do constant-time work.
What is an off-by-one error?A boundary mistake that makes a loop or index run one item too far or stop one item too early.
Give one useful test input for a function that handles an empty list specially.An empty list itself: it checks the boundary case where there are no items to process.

That is a MySummaries deck, filled with programming fundamentals material. Yours is written from your own notes. Start free

Review the answers, not just the cards

For each card, compare your response with the answer. A correct keyword without the defining distinction may not be enough. For example, “equals” alone does not distinguish assignment from comparison; say that = assigns and == compares. Likewise, “a function displays a result” is not a reliable description of return: the returned value goes back to the caller, while displaying output is a separate action.

If your answer is partly right, use Hard rather than Good. That distinction matters for cards where a small condition changes the answer: range(2, 5) excludes 5, and binary search depends on sorted data. When an answer is wrong, take a moment to identify why. Did you confuse two operators, forget a boundary, or apply an algorithm without its precondition? Then grade it Again and try to state the complete answer once more.

The MySummaries core checklist for this deck keeps the facts most likely to cause avoidable errors together:

Key pointsProgramming Fundamentals
Python assignment = binds a value; equality == compares values.
Python range(start, stop) includes start and excludes stop; range(2, 5) gives 2, 3, 4.
Binary search requires sorted data; linear search on an unsorted list is O(n) in the worst case.
A function's return value goes to its caller; print displays output. Two nested n-step loops are usually O(n²) when their bodies do constant-time work.

Turn weak answers into a second attempt

Do not try to memorise every sentence exactly. Aim to retrieve the rule and its important limit. For a complexity card, include the input-size variable and the relevant assumption. For a Python card, give the syntax and what it does. For a definition, make the contrast clear where one is asked for.

After a session, sort the misses into a few practical causes:

  • Syntax recall: you know the idea but mix up symbols or language details.
  • Concept confusion: you treat two different operations, such as returning and printing, as interchangeable.
  • Boundary or precondition miss: you forget that a range stop is excluded or that binary search needs sorted input.
  • Complexity reasoning: you state a growth rate without relating it to input size or loop structure.

Choose a small next action for each cause. For syntax, write a tiny example and predict its result. For concept confusion, explain the contrast in one sentence. For a boundary miss, test the smallest or last relevant value. For complexity, count how many times the main operation runs as the input grows. Then revisit the missed card in a later session rather than immediately repeating the entire deck.

A MySummaries remediation card from a repeated binary-search mistake could look like this:

Remediation tray

You lost this mark twice: what must be true of the data before binary search can safely discard half of the remaining search range?

Add cardDismiss

A short routine for using the deck

In a first session, attempt all 18 cards and grade each one honestly. Spend a few minutes afterwards on the cards marked Again: give the answer in your own words and make a tiny example for any syntax or boundary rule you missed.

In the next review, start with cards due for practice rather than rereading the whole deck. For each correct answer, try to give the reason as well as the fact: why does binary search need sorted data, or why is a pair of nested n-step loops usually quadratic? If you can state the answer but cannot explain the condition behind it, grade it Hard.

Finally, connect the cards to code you are already studying. Trace a loop with a small input, call a function and inspect its returned value, or compare a linear scan with a binary search on sorted items. Keep each exercise small enough that you can predict the result before running it. Flashcards help retrieve definitions and rules; short code traces check whether you can apply them.

How MySummaries helps

Build a programming fundamentals revision board from your own course notes, then use it to generate and review topic-specific flashcards. Start at MySummaries.