Question: fullname: strange docString, no actual regex code? MPORTANT: you should complete the PDP thinking process for each program. Turn in items: 1 ) fullname _
"fullname: strange docString, no actual regex code?
MPORTANT: you should complete the PDP thinking process for each program. Turn in items:
fullnameregex.py Ask the user to enter the source text to search, such as the namesource variable here:
namesource inputEnter full name in this format fir XS st middle last'
Then, you can adapt the first two code lines from lesson slide to search this new source. Edit the code to match
the new situation and change the regex pattern to identify text that could be a full name.
Hints: Initially write your regex pattern to check if the user enters three words separated by a space. Then, strive to
make the regex adaptable if the person's full name has more than or less than words. Then, think about allowing
not requiring common characters like a period, hyphen or Slides should be helpful.
For printing, end with a conditional block that provides an appropriate message if there is a match or no
create a regex to ask the user to enter va
resource text
# function to display menu
def displaymenu:
printCOMMAND MENU'
printview View user names'
printadd Add a user'
printedit Edit a user'
printdel Delete a user'
printexit Exit program'
# to display all usernames
def displayusernameusers:
userusername listuserskeys
userusername.sort
line 'usernames:
for userusername in userusername:
line userusername
printline
# to view fullname of entered username
def viewusers:
displayusernameusers
userusername inputEnter username to view
userusername userusername.lower
# if entered username present in dictionary
if userusername in users:
userfullname usersuserusername
printfullname: userfullname
# if not present
else:
printthere is no user with this user name.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
