Challenge: Test a Function

Use your knowledge to write unit tests to test a function that checks if a username is valid.

Problem statement

Suppose that we want the username to contain at least one letter followed by at least one number. Implement a function that checks this and write unit tests to test the function.

The following illustration shows some examples of valid and invalid usernames:

Get hands-on with 1200+ tech skills courses.