Task 1 Task 2 Task 3

Task 1

An algorithm has been designed to check if, when a user enters their password, their password is correct:

 

Using program code of a high level programming language eg Python, code this algorithm. Your program should have a variable with the identifier password which will store the actual password.

Task 2

 

Another algorithm has been designed to allow users to enter their email address. Any input that isn't in the correct format is rejected. The incorrect format is defined as:

Write program code to solve this problem.

Task 3

Use your answers to Task 1 and Task 2 to create 1 program.

Challenge

Can you find a way to limit the user to 3 chances only to enter either password or email?