Answer:
Step-by-step explanation:
The following code is written in Python and is a function that loops three times asking for the last name and first name. Then it uses this information to create a username. Finally, each of the names and usernames is printed on the screen.
def userName():
for x in range(3):
last_name = input("What is your last name: ")
first_name = input("What is your first name: ")
username = first_name[:3] + "#" + last_name[-3:]
print(last_name + ", " + first_name)
print(username)