← Years 5–6 Digital Systems

Username and password

A username identifies who you are and can be shared. A password proves it is really you, so keep it secret and never share it. You use both together when logging in.

Understanding Username and password in Years 5–6 Digital Systems

What it does: Logging in needs two things: the username identifies the account and the password proves it is you. A password must stay secret. If someone else knows it, they can pretend to be you. Never share your password, even with friends. Anyone who has it can pretend to be you. Usernames can be shared, but passwords cannot. If someone learns your password, change it to keep your account safe. A password is the secret proof of identity, so it is hidden on screen and never shared.

Common mistakes: The string is missing its closing quote. It should be username = "sam_k". The variable name is misspelled. The username variable is called username, so the line should be print("Welcome " + username).

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 31–40) and word search (Modules 21–52).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
What does a username do?
It identifies who you areIt proves it is really you
Matches
Keep my username secret. Tell my friend my password.
↓
This is backwards. The username can be shared, but the password is the secret that must never be shared.
Applying
Meanings
Term
username and password
Meaning
A username identifies who you are and can be shared. A password proves it is really you, so keep it secret and never share it. You use both together when logging in.
Practice
username = "sam_t5"
Testing
Gaps
= "sam99"
Check Answer
Spots
1username = "sam_k
2password = "Blue!Tree42"

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Void Whale' badge — Definition Drifter, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. What does a username do?
A. It identifies who you are ✓
B. It proves it is really you
A username identifies you. The password is what proves it is really you.
2. What does a password do?
A. It tells people your name
B. It proves it is really you ✓
A password proves you are the real owner of the account. The username is what identifies you.
3. Which one is okay to share with friends?
A. Your password
B. Your username ✓
A username is shareable because it only identifies you. Your password must stay secret.
4. Your friend asks for your password so they can play your game. What should you do?
A. Keep it secret and say no ✓
B. Share it because they are your friend
Never share your password, even with friends. Anyone who has it can pretend to be you.
5. Which statement is true?
A. A password should be kept secret ✓
B. A password is shown to everyone
Passwords are secret. If other people know your password, they can log in as you.

Match the Pairs

username: sam_k7 → Identifies who you are. It is okay to share it, because it only says which account is yours.
password: ******** → Proves it is really you. It is kept secret, which is why it is hidden with stars when you type it.
Logging in uses both a username to say who you are and a password to prove it → login(username, password)
You should never share your password with anyone → share(password) -> NEVER
Keep my username secret. Tell my friend my password. → This is backwards. The username can be shared, but the password is the secret that must never be shared.
login(password) // no username → Logging in needs both a username to identify you and a password to prove it. A password alone is not enough.

Key Term

username and password
A username identifies who you are and can be shared. A password proves it is really you, so keep it secret and never share it. You use both together when logging in.

Fill in the Blanks

1. username = "sam99"
Hint: Type the variable name for the value that identifies who you are and can be shared.
2. password = input("Enter your secret: ")
Hint: Type the variable name for the secret value that proves it is really you.
3. login(username, password)
Hint: Type the first argument, which tells the system who is logging in.
4. canShareUsername = True
Hint: Type the Boolean value showing that a username is safe to share.
5. if password == savedPassword: print("Logged in")
Hint: Type the operator that checks whether the typed password is equal to the saved one.

Spot the Error

Question 1
A username = "sam_k
B password = "Blue!Tree42"
C login(username, password)
Line A — The string is missing its closing quote. It should be username = "sam_k".
Question 2
A username = "mia_7"
B password = "Red$Moon9"
C login(username, password)
D print("Welcome " + usernam)
Line D — The variable name is misspelled. The username variable is called username, so the line should be print("Welcome " + username).
Question 3
A username = "sam_k"
B password = "Blue!42"
C if password == "Blue!42":
D print("Logged in"
Line D — The closing bracket is missing. The line should be print("Logged in") so the login message works.
Question 4
A username = "leo_9"
B password = "Sun#Hat77"
C print("Username: " + password)
D login(username, password)
Line C — This line shows the password, which must stay secret. A username can be shared, so it should print username.
Question 5
A username = "ava_p"
B password = Pink!Cat3
C print(username)
Line B — The password text is missing its quotation marks. It should be password = "Pink!Cat3".

Student with a class code? Join your class →