Question: Checkpoint 2 Write a function called findUserName that displays a suggested username based on a person's first name, last name, and a random number between

Checkpoint 2 Write a function called "findUserName" that displays a suggested username based on a person's first name, last name, and a random number between 1-5 given as a single string "randomNumber firstname lastname" (each separated by a single space, may contain both upper and lower case letters). The result should be the person's first name initial in uppercase, followed by the last name (all the letters in lower) and the multiplication of random number and number of characters of the last name. Note: Steps of findUserName function can be given as follows: def findUserName (s): 1. Separate random number, first name, and last name from string s 2. upperFirstInitial -First letter of the first name in uppercase 3. lowerLast-Lowercase last name . num-Integer value of random number Number of characters in the last name 5. Concatenate the substring in the order, upperFirstInitial, lowerLast and string value of num and display the result. For example, findUserName ("2 MARY TWEED") would display Mtweed10. Save the script as "lab4_checkpoint2.py" in the cs104lab4 folder
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
