Question

Q3 Password Tester 35 Points Purpose: Write a method that processes strings. In this problem, you will write a program that tests whether or not a user-entered password satisfies certain criteria for password strength (against attack). You should ask the user for a password using keyboard input, check the password's strength by calling a user-defined, and tell them whether it is acceptable or not. You should use a while loop to keep asking them to enter a password until they have entered one that is acceptable. A password is acceptable if it has high complexity. Per KU's password policy, https://policy.ku.edu/IT/Password, it must satisfy the following standard: must be 8 to 32 characters long, and contain at least one of each of the following: uppercase letters ('A' - 'Z') lowercase letters ('a' - 'z') numerals ('0¹-'9') special characters: '-'/' or ': '-?' or ' [ ' - ' ` ' or ' { ' - '~ See the Basic Latin Unicode Charts for characters in these ranges Hints: You may, but do not have to, start with Check PalindromicPhrase.ipynb again. The following boolean expression evaluates to True if character c is a digit: с/n(c>= '0') and (c <= '9') You may also wish to look at the examples in our book, TP2, Sections 9.2-3, especially has_no_e() • This linked notebook implements a pattern that is a counterpoint to has_no_e() Development Plan: • [15 points] Write a boolean function password_valid (pw) that returns True if pw passes the standard above, and False otherwise • [10 points] In a separate block, write some positive and negative tests to test your function on each of the pieces of the standard. Keep iterating on your function until it gives answers to your liking. • [10 points] In a separate block, write the while loop that asks the user for a password until they give one that passes the test. Remember: to get quotes in a quote, remember you can use single or double quotes to delimit a string or you can use the escape character sequences (e.g., \\, \"). ALSO: COMMENT your program Turn in: Use the boxes below to turn in the final answers for each completed part of your development plan. Q3.1 15 Points Cut-and-paste of your commented function, password_valid ONLY/nQ3.2 10 Points Your code block of positive and negative tests: Save Answer Q3.3 10 Points Your code block with the while loop: Save Answer/nQ4 Scrabble Challenge Dictionaries 15 Points Purpose: Use Python dictionaries in the context of a simple game application. Complete the SCRABBLE CHALLENGE from lecture: Create a dictionary tile_counts mapping letters to counts of tiles, and • a dictionary tile_points mapping letters to points. From https://en.wikipedia.org/wiki/Scrabble letter_distributions#English: Table of scrabble tile counts/frequencies by value, e.g., there are 3 "G" tiles, worth 2 points each 1: Ex12 Ax9 1×9 0x8 Nx6 Rx6 Tx6 Lx4 SX4 UX4 2: Dx4 Gx3 3: Bx2 Cx2 Mx2 Px2 4: Fx2 Hx2 Vx2 Wx2 Yx2 5: K 8: J X 10: QZ Then, iterate over the keys to print a table that would start like this: Letter Count Points ? A B 2 9 2 0 1 3

Fig: 1

Fig: 2

Fig: 3

Fig: 4