The BitMon & Python


Task 1 - Registration Form Flow Chart

  • Ask the user to enter a username. If the username is already used, the program ends, after a message is displayed.
  • If the username is new, the user must enter a password at least 8 characters
  • If the password is too short, the program ends with a message.
  • If the password is good, then it must display a success message.

Input / Output

The parralelogram represents an input or an output.

START / END

The ellipse shape signifies that a program starts or ends.

Process

The rectangle shape represents an action that does not involve an input or an output.

Decisions

The rectangle shape represents an action that does not involve an input or an output.

Task 2 - Coding the registration form

You now need to make changes to the code you had seen above. Fork the following replit code and make the changes to reflect the points below.

  • Ask the user to enter a username. If the username is already used, the program ends, after a message is displayed.
  • If the username is new, the user must enter a password at least 8 characters
  • If the password is too short, the program ends with a message.
  • If the password is good, then it must display a success message.
  • If the password is good, then the new username must be added to the list of usernames.

tips on how to complete the tasks.

Task 3 - Improving the registration form

You now need to make changes to the code you had worked on in task 2 to include the following:

  • Add comments so the code is easy to understand later on
  • When checking the username, the program should treat uppercase letters and lowercase letters as being the same. eg User1 is the same as user1
  • The user is allowed 3 tries to enter a username that has not already been used, before the program ends
  • The user is allowed 3 tries to enter a password that is at least 8 characters long before the program ends
  • If the username is new, the user must enter a password at least 8 characters

tips on how to complete the tasks.

Extension

--- task 3 to include the following:

  • Add comments so the code is easy to understand later on
  • When checking the username, the program should treat uppercase letters and lowercase letters as being the same. eg User1 is the same as user1

tips on how to complete the tasks.