~ Introduction to the task: NEA Task 1, OCR, Challenge yourself


Sample Project - Form Tutor Management System

*Teachers with subscriptions will have access to all worked solutions and python code. This sample project is based on OCR GCSE NEA Task 1

CHALLENGE: 

Create a login screen. Define a function (call it "login"). The form tutor should be able to use username:formtutor and password: teacherypass to access the system. Show a message which says "Access Granted" if the credentials entered are correct. 

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.

#Form Tutor Management System


def main():
    login()
    
def login():
    username="formtutor"
    password="teacherypass"
    print("Enter username : ")
    answer1=input()
    print("Enter password : ")
    answer2=input()
    if answer1==username and answer2==password:
        print("Welcome - Access Granted")
        menu()

def menu():
    print("************MAIN MENU**************")

    
#the program is initiated, so to speak, here
main()

Remember Decomposition? Breaking the problem down?

Well, hopefully you've done that for the entire problem - have a read of the introduction and task again, if not. We have broken it down ourselves, but you may have a different method. Always try it yourself, before looking at the suggested answers

There is no one perfect way to solve a problem, but we're going to take you through a possible solution, and try it yourself to see if you can do better, for each step! 

The problem could be broken down into the following sub-problems. We are going to solve (or try to) each one:

1. Create a Login Screen

2. Create a Main Menu and define all the functions/sub programs needed in the program

3. Create a registration feature (need to save this to a file)

4. View all Student details (read from file)

5. Create a "Search by ID" feature

6. Create a "Produce Reports" feature

7. Search by Birthday (OR DOB) or Address feature (this is a report)

8. Create a report for Males and their emails

9. Create a report for all Females and their emails

10. Final Solution - reflect! How could you improve it? Test it!

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!