Password Generator — Volunteer Notes

Introduction:

In this project, children will learn what makes a good password, and how to make a program that creates randomly generated passwords.

This project has been written for Safer Internet Day 2017, which is on 7th February 2017. The aim of Safer Internet Day is to promote the safe and responsible use of technology for young people. For more information visit saferinternet.org.uk where you’ll find an education pack for 7-11 year-olds containing additional resources.

Online Resources

This project uses Python 3. We recommend using Trinket to write Python online. This project contains the following Trinkets:

There is also a trinket containing the finished project:

Offline Resources

This project can be completed offline if preferred.

You can find the completed project in the ‘Volunteer Resources’ section, which contains:

  • password-creator-finished/passwords.py

(All of the resources above are also downloadable as project and volunteer .zip files.)

Learning Objectives

  • Repetition;
  • The random.choice() method;

Challenges

  • “Creating a better password” - using howsecureismypassword.net to create secure passwords.
  • “Using numbers and punctuation” - adding text to a string variable, giving a wider choice of random characters.
  • “A longer password” - modifying the number of times a random character is chosen.
  • “Choosing the number of passwords” - using a variable to specify the number of passwords required.