Question: IN PYTHON 3 Your boss wants you to create a program that can take a user's email from their biography, create a password for the
IN PYTHON 3
Your boss wants you to create a program that can take a user's email from their biography, create a password for the user, and save it into a dictionary for later use. The email will be in the form alphabetic@ucla.edu (no numbers, all lowercase). The username is the characters before the domain name (ie. johnsmith in the email johnsmith@ucla.edu). To create the password, you need to alter the username with ROT13.
ROT13 (rotate by 13 places) is a simple substitution cipher that replaces a letter with the 13th letter after it in the alphabet. For example, "j" is the 10th letter in the alphabet. Altering "j" with ROT13 will get the 23rd (10 + 13 = 23) letter of the alphabet, "w". Likewise, if you altered "w" with ROT13, you will get the 10th (23 + 13 = 46 - 26 = 10) letter of the alphabet, "j". Thus in our example with johnsmith@ucla.edu, the password will be "wbuafzvgu". Save both the username and password in a dictionary.
Input:
The input will be several sentences on a single line containing exactly one email within the biography with the form: alphabetic@ucla.edu.
Output:
Print your dictionary which contains "username": and "password":
#Example Input
str_input = "Tingting Nian, Assistant Professor at The John E. Anderson School of Management at University of California, Los Angeles, studies social media, online communities and economics of digital goods. Her prior research has won the 2014 INFORMS Conference on Information Systems and Technology Best Conference Paper Award and a WCAI Research Award from Wharton Customer Analytics Initiative. Her email is tnian@ucla.edu. She received her PhD in Business Administration (specialized in Information Systems) from Leonard N. Stern School of Business at NYU in 2015 and holds a Bachelor’s degree in Business Administration from Tsinghua University."
#Example Output:
{'username': 'tnian', 'password': 'gavna'}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
