The Student Room Group

Practice NEA assignment

We have a new supply teacher for our GCSE in Computing and she has set us this task to help us prepare for the NEA we have to do. We have to write down the pseudocode and do a flowchart. Any halp please. I can’t do it.

You have to write a program that logs somone in to a game or quiz.
The user might be completely new, or might be an existing user.
If the user is new, you have to ask them to select a login and password and save this in a file.
If the user already exists, you have to ask them to enter their login and password and check it against a file.
If the user is incorrect, then tell them user doesn’t exist and renter it.
If user correct but password incorrect, tell them password incorrect and renter it.
User has three attempts to enter the password. After the third attempt, they are forced to wait 10 minutes before trying again.

After this, we have to write a quiz flowchart in Python that lets someone do a 10 question quiz and record their result in a file. They have to select how hard the quiz is, on a scale of 1 to 5.

Our last computer teacher just disappeared a month ago and we have been told the new teacher will take over. Help me please.
Original post by Prettypatel
We have a new supply teacher for our GCSE in Computing and she has set us this task to help us prepare for the NEA we have to do. We have to write down the pseudocode and do a flowchart. Any halp please. I can’t do it.

You have to write a program that logs somone in to a game or quiz.
The user might be completely new, or might be an existing user.
If the user is new, you have to ask them to select a login and password and save this in a file.
If the user already exists, you have to ask them to enter their login and password and check it against a file.
If the user is incorrect, then tell them user doesn’t exist and renter it.
If user correct but password incorrect, tell them password incorrect and renter it.
User has three attempts to enter the password. After the third attempt, they are forced to wait 10 minutes before trying again.

After this, we have to write a quiz flowchart in Python that lets someone do a 10 question quiz and record their result in a file. They have to select how hard the quiz is, on a scale of 1 to 5.

Our last computer teacher just disappeared a month ago and we have been told the new teacher will take over. Help me please.


If you know the basic flowchart shapes, then you should be able to do it fairly easily.

Plenty of good documentation out there on how to deal with .txt or even .csv files. Programming is one of those topics where you must read, read and read documentation.
Reply 2
Sokay. Someone helped me and I have everything I need and an actual quiz aswell.
Reply 3
Help me with that aswell
I can't be bothered with the flowchart but I can help with pseudocode...have you guys done functions and procedures yet? They can greatly increase the efficiency of this.

Use this guide http://www.ocr.org.uk/Images/202654-pseudocode-guide.pdf

newUser = input('Are you new?':wink:
file = openRead('sample.txt':wink:
if newUser == true then
....username = input('username?':wink:
....password = input('password?':wink:
// perform validation checks here like if len of username/password isn't greater than 5 then embed this in a loop
if everything is valid then
....file.writeline([username + ' ' + password]) // writes password to file on a line

// now scan the entire document 'file' and store this data in a list of lists(2 lists, username and pass) called user_pass
// user_pass[0] denotes username, user_pass[1] is the same user's password

attemptCount = 0
isCorrect = false
else
....while isCorrect = false
........if attemptCount > 0:
............print('incorrect username/pass':wink:
........username = input('username':wink:
........password = input('password':wink:

........// compare entries to lists simultaneously which searches both lists and checks if there is a match, then set isCorrect bool to true
........// otherwise if attempt count == 2 and it's still wrong, print error and pause thread for 10minutes and reset attemptCount
........attemptCount += 1

// set their username and pass here
// the questions can be set here and looped through, if its a maths quiz just randomly generate numbers and operations. Then writeLine to file2 with [username + pass + score]
(edited 6 years ago)

Quick Reply

Latest

Trending

Trending