Write a program which asks the user to enter their first name and their family name....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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.
Expert Answer:
Answer rating: 100% (QA)
Certainly Based on the given instructions from the image you need to create a Python program that wi... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
Write a function total_equal_sides (ax, ay, bx, by, cx, cy, dx, dy): that consumes eight integers: ax and ay (the first vertex), bx and by (the second vertex), cx and cy (the third vertex), and dx...
-
Consider a set of documents. Assume that all documents have been normalized to have unit length of 1. What is the "shape" of a cluster that consists of all documents whose cosine similarity to a...
-
Conduct research to determine the impact of the Sarbanes-Oxley Act (SOX), Generally Accepted Accounting Principles ( GAAP ), Generally Accepted Auditing Standards (GAAS), and the International...
-
According to a theory in psychology, young female adults show more emotional empathy towards others than do males. The Journal of Moral Education (June 2010) tested this theory by examining the...
-
List and discuss the major information security and privacy threats to organizations.
-
Caldwell Mining Co. acquired mineral rights for $127,500,000. The mineral deposit is estimated at 425,000,000 tons. During the current year, 42,000,000 tons were mined and sold. a. Determine the...
-
If I threw a 1 . 0 kg text book up into the air with a speed of 5 . 0 km / s , what maximum height would it reach? The mass of the Earth is 5 . 9 8 x 1 0 ^ 2 4 kg and its radius is 6 . 3 8 1 0 ^ 6...
-
On January 1, 2020, Goodhue Inc. had the following stockholders equity balances. Common Stock (400,000 shares issued) ........................................ $800,000 Paid-in Capital in Excess of...
-
Compute the gross profit ratio for each of the two years reported. 2. Did the company outperform or underperform the industry average gross profit ratio of 30% in the current year? 3. Did the gross...
-
A condition that may increase either the severity or frequency of an economic loss is: A. Adverse selection. B. Hazard. C. Peril. D. Risk.
-
A pooled income fund is a_______ created by a________ . A. Charity/trust. B. Foundation/university. C. Nonprofit/donor. D. Trust/charity.
-
Which of the following is not an element of an insurable risk? A. A sufficiently large number of homogeneous exposure units. B. Catastrophic loss. C. A definite loss. D. A fortuitous loss.
-
Gene MacArthur, a wealthy 55-year-old widower, wants to reduce his taxable estate, supplement his current income, provide an inheritance for his children, and benefit his alma mater. He doesnt want...
-
In which does a donor transfer cash, marketable securities, or other assets to a qualified charitable organization in exchange for a commitment by the organization to pay the donor a specified amount...
-
1. Calculate v, in the circuit using superposition. 2H ww ell 12 cos 31 V (* 4 sin 2t A 10 V
-
As long as we can't lose any money, we have a risk-free investment." Discuss this comment. Q2: Both investing and gambling can be defined as "undertaking risk in order to earn a profit." Explain how...
-
Which of the following Case clauses is valid in a Select Case statement whose selectorExpression is an Integer variable named intAge? a. Case Is > 21 b. Case 21, 65 c. Case 1 To 10 d. All of the...
-
In this exercise, you modify the Professor Schneider application from Exercise 10. Use Windows to make a copy of the Schneider Solution folder. Rename the copy Schneider Solution-TwoDim. Open the...
-
Open the Calories Solution.sln file contained in the VB2017\Chap08\Calories Solution folder. Open the Code Editor window and locate the btnDisplay_Click procedure. The procedure declares and...
-
If a politician running for office does not speak in general terms, does not try to move to the middle of the political spectrum, and does not take polls, is the median voter model therefore wrong?
-
Voters often criticize politicians running for office who do not speak in specific terms (i.e., who do not specify which spending programs will be cut, whose taxes will be raised, etc.). If voters...
-
Why is rent-seeking activity socially wasteful?
Study smarter with the SolutionInn App