Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Programming def create_usernames(names): Question 6 - Given a list of names, return a list with the names converted to usernames. to convert a

Python Programming

def create_usernames(names): """ Question 6 - Given a list of names, return a list with the names converted to usernames. to convert a name to a username, take the first character of the first name, the entire last name, put them together with no spaces, make all characters lowercase, and then add the number 3 to the end. - You can assume that all inputted names will only have one space character, which will separate the first name and the last name. >>> create_usernames(["Angela Martin", "Pam Beesly"]) ["amartin3", "pbeesly3"] >>> create_usernames(["Jan Levinson"]) ["jlevinson3"] >>> create_usernames([]) [] """ pass

def sort_by_age_desc(list_of_employees): """ Question 7 - Michael is thinking about giving his employees a raise based on how long they have worked at Dunder-Mifflin. Unfortunately, he has confused this number with the employee's ages. Return a list that starts with his oldest employees and ends with his youngest. >>> emps = [ ("Kelly Kapoor", 32), ("Pam Beesly", 30), ("Jim Halpert", 36), \ ("Creed Bratton", 73), ("Dwight Schrute", 38) ] >>> sort_by_age_desc(emps) [('Creed Bratton', 73), ('Michael Scott', 42), ('Dwight Schrute', 38), \ ('Jim Halpert', 36), ('Pam Beesly', 30)] """ pass

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions