ic01 : Review for Final Exam

num ready? description assigned due
ic01 true Review for Final Exam Wed 09/05 09:30AM Wed 09/05 10:50AM
  1. Write the definition of a Python function maskedPassword that takes one parameter password and return a string consisting of the first three characters contained in the variable password followed by ‘x’s instead of the remaining characters in password. The length of the returned value should be the same as the length of the parameter passed in. (YOU MAY ASSUME password is of type str)

  2. Write three test cases (in the style of the pytest module) that for the function maskedPassword as defined above.

    1. Write your one test case here:
    2. Write a second test case here:
    3. Write a third test case here:
  3. Write the definition of a Python function isValidPassword that takes a parameter password and returns True if the variable password is of type str and is a valid password, according to the following rules: it must consist of at least 8 characters, include one of the special characters * or # and terminate with a numeric digit (0-9).

  4. Write three test cases (in the style of the pytest module) that for the function maskedPassword isValidPassword as defined above.

    1. Write one test case here:
    2. Write a second test case here:
    3. Write a third test case here: