the first program is about seventy lines long and involves text processing the second program is around ninety lines long and is mathematical in flavor between themthe programs make use of dictionarieslistsnamed tuplesand setsand both make great use of the str format(method from the preceding generate_usernames py |imagine we are setting up new computer system and need to generate usernames for all of our organization' staff we have plain text data file (utf encodingwhere each line represents record and fields are colon-delimited each record concerns one member of the staff and the fields are their unique staff idforenamemiddle name (which may be an empty field)surnameand department name here is an extract of few lines from an example data/users txt data file :albert:lukas:montgomery:legal :albert:lukas:montgomery:sales :nadelle::landale:warehousing the program must read in all the data files given on the command lineand for every line (recordmust extract the fields and return the data with suitable username each username must be unique and based on the person' name the output must be text sent to the consolesorted alphabetically by surname and forenamefor examplename id username landalenadelle ( nlandale montgomeryalbert ( almontgo montgomeryalbert ( almontgo each record has exactly five fieldsand although we could refer to them by numberwe prefer to use names to keep our code clearidforenamemiddlenamesurnamedepartment range( it is python convention that identifiers written in all uppercase characters are to be treated as constants we also need to create named tuple type for holding the data on each useruser collections namedtuple("user""username forename middlename surname id"we will see how the constants and the user named tuple are used when we look at the rest of the code