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:
1) fullname_regex.py Ask the user to enter the source text to search, such as the name_source variable here:
name_source = input('Enter full name in this format fir XS02 st middle last').
Then, you can adapt the first two code lines from lesson slide 13, 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 3 words. Then, think about allowing
(not requiring) common characters like a period, hyphen or '. Slides 11-13 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 display_menu():
print('COMMAND MENU')
print('view- View user names')
print('add- Add a user')
print('edit- Edit a user')
print('del- Delete a user')
print('exit- Exit program')
# to display all usernames
def display_username(users):
user_username = list(users.keys())
user_username.sort()
line = 'usernames:'
for user_username in user_username:
line += user_username +''
print(line)
# to view fullname of entered username
def view(users):
display_username(users)
user_username = input('Enter username to view ')
user_username = user_username.lower()
# if entered username present in dictionary
if user_username in users:
user_fullname = users[user_username]
print('fullname:'+ user_fullname +'.
')
# if not present
else:
print('there 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!