~ Creating a search feature for a dating site in Python


Creating a Search feature for your dating system

*Teachers with subscriptions will have access to all worked solutions and python code. This sample project is based on a unique idea by TeachYourselfPython. Maybe we are on to something with the dating algorithm...?!

CHALLENGE: 

Create a search feature (for instance, search by gender) for your prototype Dating System. The whole point of a dating website or system is that individuals can register, login and then get searching for their soul mates! A search feature is central to many applications - think of facebook, youtube, and countless other applications that you make use of every day. Where would we be without a "search" feature? We're all always searching for something...right?. Create a SEARCH BY GENDER feature - allow the user to specify which gender they are after (e.g. Male or Female), and get the program to return a list of the respective males or females held in the dating file. You can then go on to create a feature that allows users to SEARCH BY KEYWORD  

SUGGESTED SOLUTION / CODE: 

Note: See if you can do better (and you should be able to). The solutions provided are basic, and allow for discussion on possible alternative methods and solutions.

Search by Gender


Search by Keyword

Analyse

Write your own summary of the problem. What are your objectives? List the success criteria

Design Tools

Designing something or writing out some pseudocode before you actually write code is always a good idea! Get in to the habit of doing so! You can draw your flowchart here and screenshot it.

Try it yourself

Testing Table

You may want to read a little about Testing first. A teacher may go through some examples with you. Feel free to fill in the test table here, and screenshot it in to your powerpoint. Testing is absolutely essential once you have created a program!
Test No. Description Test Data(input) Expected Outcome Actual Outcome Further Action?
1
2
3
4
5
Coming soon!