Answered step by step
Verified Expert Solution
Question
1 Approved Answer
python only Write a program which asks the user to enter their first name and their family name. The program should then create a UPI
python only
Write a program which asks the user to enter their first name and their family name. The program should then create a UPI by concatenating the first letter of the first name, the first 3 letters of the family name and a random number between 100 and 999 (inclusive). If the family name has less than 3 letters, then the UPI is created by concatenating the first letter of the first name, then all the letters of the family name and a random number between 100 and 999 (inclusive). Notes: - Assume all letters will be in lower case. - You do not need to import the random module as it has already been done for you. - You can use the built-in function str() to convert the number to a string before concatenating it into the UPI. - The output must be in the format shown in the example below, including the format of the prompt, and all spaces and punctuationStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started