Question 6

Edexcel Computer Science June 2023 Paper 2GCSE15 marks

On the specification

1.2 Algorithms6.4 Input and output
Question text

6 A program is required to determine if a user can access a database. The names and passwords of users are stored in a two-dimensional array. Open file Q06.py Write a program to meet these requirements. Inputs • Prompt for and accept a user name and a password – neither should be blank Process • Implement authentication by searching the array for the user’s name and password – ensure the search works for any length of array Output • Display a suitable message when the correct combination of name and password is found • Display a suitable message when the user’s name is found but the password does not match • Display a suitable message when the user’s name is not found Use comments, white space and layout to make the program easier to read and understand. Do not add any additional functionality. Save your amended code as Q06FINISHED.py (Total for Question 6 = 15 marks)