Can you help me write an authentication progam that would deny access to unathorised users using basic programming language.

I would ask the user to input a secret word, then test to see if that word is correct, if it is, enter. If not, give him three chances to enter it, if wrong, exit.

yes i can help you

Of course! I can help you write an authentication program that denies access to unauthorized users using a basic programming language. Let's assume we are using the Python programming language for this task. Below is a step-by-step explanation of how you can approach this.

Step 1: Define a list of authorized users
To implement authentication, you need a list of authorized users. This list typically contains the usernames and passwords of those who have access. For simplicity, we will store this information in a dictionary.

Here's an example:

```python
authorized_users = {
"user1": "password1",
"user2": "password2",
"user3": "password3"
}
```

Step 2: Prompt the user for input
You will need to prompt the user for their username and password. In Python, you can use the `input()` function to get user input.

```python
username = input("Enter your username: ")
password = input("Enter your password: ")
```

Step 3: Check user input against authorized users
Compare the user's input against the authorized user list to determine if they are authorized or not. If the entered username matches one in the authorized users dictionary and the entered password matches the corresponding password, the user is granted access.

```python
if username in authorized_users and password == authorized_users[username]:
print("Access granted! Welcome, " + username)
else:
print("Access denied! Invalid username or password.")
```

Now, whenever a user tries to access your program, they will be prompted for their username and password. If they provide the correct credentials, access will be granted. Otherwise, access will be denied.

Remember that this is a basic implementation and it is important to consider security practices (such as using strong passwords, encrypting sensitive information, etc.) when implementing authentication in real-world applications.