Question: Username Generator Websites and apps often suggest a username for new users, based upon some details the user provided. Write a function below called username

Username Generator
Websites and apps often suggest a username for new users, based upon some details the user provided. Write a function below called username_from_name which takes the user's full name, and returns a suggested username. The username should be lowercase, and with all spaces replaced with underscores
For example:
John Smith john_smith
Maria Fernanda Coro Vargas maria_fernanda_coro_vargas
[]1 # Write your 'username_from_name' function here
2
3
4 name = 'Alice Adams'
5 print(username_from_name(name))
Improved Username Generator
A better way to suggest a username might be to extract part of their email address. Write a function below called username_from_email which takes an email address, then slices and returns the part before the a character. The username should be again be all lowercase - you can assume that it is already a valid email address, but that it may have uppercase characters.
 Username Generator Websites and apps often suggest a username for new

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 Databases Questions!