For Project 5, we'll be creating a To Do List program in Python.
You'll continue to learn more concepts in Python as well as reinforce the software development we have been using for each project.
By the end of this project, you will have gained valuable experience and foundational skills that will be useful for future projects:
Master the basics of creating and using lists in Python.
Learn how to add to and remove items from lists.
Learn how to search and sort lists.
Learn how to identify and fix common types of errors.
These skills are essential for anyone starting in programming and will help you tackle more complex projects in the future.
For this task we will look at combining the "Requirements Definition" and "Determining Specifications" steps. Remember the former is "what" and the latter is "how", so we will create a table that represents this.Β
Listen to Leah below, she has a program he wants you to build. If you're still not sure afterwards, you can chat with her using the chatbot below.
πΒ Afterwards, write down at least five requirements into your workbook, in plain-English, that you think Leah wants you to include in the program. These should be ordered from highest priority (essential features) to lowest priority (nice to haves).
In the second column (specifications), write down how you think you will implement those requirements. The labs will help with this, so add more detail later if necessary. Also, an example from the guessing game project is provided to help you understand what to do.
Design is your game plan. Before you start coding, you sketch out what steps your program needs to take and how it should flow.
Storyboarding is a valuable technique in software development as it facilitates visualizing the user's journey through the application, rather than focusing on isolated screens. This approach helps in creating a cohesive user experience, as developers and designers can understand how users will interact with the software in a sequence of steps. Storyboarding surpasses a single screen design by providing a broader perspective of the application's flow, interactions, and transitions.
π In your workbook, complete the storyboard activity.
Now comes the fun part: actually making your program. This is where you write the code. Open the GitHub Classroom assignment.
There are four labs to complete in order to learn the concepts necessary to complete this project. Complete these first.
Learn how to create and manipulate lists in Python.
Get set up on GitHub with Project 5
Delve into more advanced features of lists, such as removing items, searching within a list, and sorting.
Learn how to identify and fix different types of errors in Python.
Once again I have some further requirements for you to follow.
I have broken these down into two categories:Β
less comfortable - just the basics
more comfortable - for those of you after more challenge
Less Comfortable:
Use lists to store the data
Be able to add, view, modify and delete tasks
Use functions to structure your code
A menu system to access all functionality from
More Comfortable
Mark tasks as complete
Search and sort functions
Adjust priority of list items
Extensive input validation and error handling
Readable code is not just about writing code that works; it's about writing code that other people (and your future self) can understand easily. Here are some key aspects:
Clear Naming Conventions: Use meaningful names for variables, functions, and classes.
For example, total_price is more understandable than just tp.
Consistent Indentation and Spacing: Consistency in spacing and indentation makes your code more organised and easier to follow.
Logical Structure: Organise your code in a logical manner. Related functions and variables should be grouped together.
Minimal Complexity: Avoid overly complex solutions. Simpler code is usually better.
Break down complex problems into smaller, manageable functions.
Comments in your code are not for the computer; they are for humans. Quality comments help explain the purpose and logic of your code.
Here's what they should do:
Explain Why, Not What: Good comments explain why a certain piece of code is there or why itβs written in a particular way.
Avoid stating the obvious.
Provide Context: Sometimes, the context in which something is done is not immediately obvious.
Good comments can provide that missing context.
Document Non-Obvious Choices: If you chose a specific approach that might not seem straightforward, explain your reasoning.
As a software engineer, you often work in teams. Writing readable code with quality comments makes it easier for your teammates to understand, maintain, and build upon your work. It's not just about the code functioning correctly; it's about making the code sustainable and accessible for future development.
π Complete the peer code review activity in your workbook.
After receiving your peer feedback, see if you can go back through your program and enhance its maintainability by improving your code commenting and meaningful variable names.