Strong passwords

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Strong passwords

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which password is stronger?
A abc123
B blue-Tiger-jumps-42!
2. What matters most for making a password strong?
A Making it long
B Making it short so it is easy to type
3. Which password should you avoid?
A R7!fox-plum-Cloud9
B password123
4. True or false: A strong password can include your birthday.
A False - birthdays are easy for others to guess
B True - a birthday is hard to guess
5. Which mix makes a password harder to guess?
A Letters, numbers and symbols
B Only lowercase letters

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1BlueTiger!Eats7Pizza AA strong password: long, mixes letters, numbers and symbols, and is hard to guess
2password123 BHq7!Lemon$Rocket42
3Length matters most: a longer password is harder for others to guess CA weak password: it is a common word with an easy number that others can guess quickly
4A strong password avoids names and birthdays that others might know DIt uses a name and a birth year, which others can easily guess, and it is too short
5Mia2014 ESunny!Frog7Jumps#Over9Logs
6abc123 FIt is very short and uses a simple pattern, so it is easy to guess and not strong

Definitions

strong password

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
password = "BlueTiger!7Sky" print(___(password))
2.
password = "BlueTiger!7Sky" longer = len(password) _ 11
3.
weak = ["password123", "qwerty"] if password __ weak: print("Too easy to guess")
4.
long = len(password) >= 12 symbol = "!" in password strong = long ___ symbol
5.
words = ["blue", "tiger", "jump", "cloud"] passphrase = "-".____(words) print(len(passphrase))

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A pw = "Tr33!House#Blue9"
B length = len(pw)
C if length <= 12:
D print("Long enough")
Question 2
A bad = ["password123", "Mia"]
B pw = "password123"
C if pw not in bad:
D print("Good choice")
Question 3
A min_length = 3
B pw = "Blue!Tiger_84_Cloud"
C if len(pw) >= min_length:
D print("Long enough")
Question 4
A pw = "Tr33!House#Blue9"
B has_symbol = pw.isalpha()
C has_number = "3" in pw
D print(has_symbol and has_number)
Question 5
A pw = "Tr33!House#Blue9"
B name = "Mia"
C if name not in pw:
D print("Weak password")

Answer Key

Strong passwords
Section A: Quick Questions
Q1
B — blue-Tiger-jumps-42!
Q2
A — Making it long
Q3
B — password123
Q4
A — False - birthdays are easy for others to guess
Q5
A — Letters, numbers and symbols
Section B: Match the Pairs
Q1
BlueTiger!Eats7Pizza → A strong password: long, mixes letters, numbers and symbols, and is hard to guess
Q2
password123 → A weak password: it is a common word with an easy number that others can guess quickly
Q3
Length matters most: a longer password is harder for others to guess → Sunny!Frog7Jumps#Over9Logs
Q4
A strong password avoids names and birthdays that others might know → Hq7!Lemon$Rocket42
Q5
Mia2014 → It uses a name and a birth year, which others can easily guess, and it is too short
Q6
abc123 → It is very short and uses a simple pattern, so it is easy to guess and not strong
Section C: Definitions
Q1
strong password — A password that is long and hard for others to guess. It avoids names, birthdays and common words like password123, and it mixes letters, numbers and symbols.
Section D: Fill in the Blanks
Q1
password = "BlueTiger!7Sky" print(len(password))
Q2
password = "BlueTiger!7Sky" longer = len(password) > 11
Q3
weak = ["password123", "qwerty"] if password in weak: print("Too easy to guess")
Q4
long = len(password) >= 12 symbol = "!" in password strong = long and symbol
Q5
words = ["blue", "tiger", "jump", "cloud"] passphrase = "-".join(words) print(len(passphrase))
Section E: Spot the Error
Q1
C — Length matters most for a strong password, so the check should pass when the password is long. It should be length >= 12, not <= 12, which would approve short passwords.
Q2
B — 'password123' is a very common password that is easy to guess. The line should set a long, mixed password such as "Hd7#kQ!2vLp9".
Q3
A — A minimum length of 3 is far too short, so almost any password would pass. Strong passwords are long, so the minimum should be about 12.
Q4
B — isalpha() only checks whether every character is a letter, so it does not detect symbols. A symbol check should be not pw.isalnum().
Q5
C — A password that contains a name is weak and easy to guess. The check should be if name in pw, so the warning shows when the name is found.