Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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 contains 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 ofrandom 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. upperFirstInitialFirst letter of the first name in uppercase. 4. num -Integer value of random numberNumber of characters in 5. Concatenate the substring in the order, upperFirstInitial, lowerLast and string value of num and display the result

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions