Question: Write a program which asks the user to enter their first name and their family name. The program should then create a UPI by

Write a program which asks the user to enter their first name and their family name. The program should then

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 punctuation. For example: Test Input random . seed (74) thomas lacombe random. seed (24) na li Result Enter your first name: thomas Enter your family name: lacombe Your UPI is tlac980. Enter your first name: na Enter your family name: li Your UPI is nli829.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Certainly Based on the given instructions from the image you need to create a Python program that wi... View full answer

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