Lists · capstone
Capstone project: Project: Build a Small Organizer
You can now create an ordered collection, select and replace its items, grow it, shrink it, search it,
Your organizer can track books, errands, packing items, goals, recipes, or another subject you care about. You will work with four current items and one completed item. You do not need a
Plan the state changes
Begin with four non-empty
Replace the second item with a more useful version.
Append a fifth item.
Pop the item at
2intocompleted_item.Copy the remaining four items into
backup.
The order matters because every change can affect later indexes. Trace the
Here is a smaller example of planning several changes:
Make the result readable
A program is easier to use when its output explains itself. Print a heading, the completed item, and each current item with its position:
1. first item
Because loops belong to the next chapter, write four explicit print calls using indexes 0 through 3. This repetition is intentional. It will give you a concrete reason to appreciate loops soon.
Check your own work
Before submitting, confirm that:
itemscontains four non-empty strings after the append and pop;completed_itemis not still initems;backuphas the same values asitemsbut is a separate list;the output includes a heading, the completed item, and all four current items;
your code uses only ideas introduced so far.
This is your first organizer, so keep its subject personal and its structure clear. The fancy filing cabinet can wait.
Task
Build a small organizer by completing the starter program.
Requirements:
Replace the second starting item with a more specific non-empty
. Append a fifth non-empty string.
Pop the item at
2and store it incompleted_item.Copy the resulting four-item
itemsinto backup.Print the heading
My organizer.Print
Completed: ...with the completed item.Print the four current items as numbered lines using indexes
0through3.
You may personalize every item. Do not use a
Choose four non-empty starting strings and keep the completed item different from the remaining items. Once the program runs, use Step in the exercise editor to inspect the list after each change.