[10 marks] Your task Is to write a program that determines how similiar a user's name...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
[10 marks] Your task Is to write a program that determines how "similiar" a user's name (first and last name) is to your name. A user's name will be assigned a score based on how similar their name is to yours, using the foilowing scoring system: • Beginning similarity: o When the first 3 letters of their name are the same as yours, they get 8 polnts. o When only the first two letters are the same, they get 3 points. o When only the first letter is the same, they get 2 points. o When none of these conditions apply, they get 0 points. • Ending similarity: o When the last two letters of their name are the same as yours, they get 6 points. o When just the last letter is the same, they get 3 points. o When none of these conditions apply, they get 0 points. • Length similarity: o When the length of their name is exactly the same as yours, they get 8 points, otherwise, they get 0 points. o When the length of their name is less than yours, their entire score becomes negative. For example, if my name was "Joe Smith" and the user entered the name "Jane Doe", their score would be -2, as they would get 2 points for beginning similarity, O points for ending similarity, and their score becomes negative since their name is shorter than mine (my name length is 8, theirs is 7). Write a program that does the following: 1. Asks the user for their name. 2. Calculates their score based on the above criteria. 3. Reports to the user what score they got. Submission instructions: • Your program must include a comment at the top with your name and the question number. Your file name should be either final_q1_INITIAL_LASTNAME.sb3 or final q1_INITIAL LASTNAME.py (eg., if your name is Rob Allen, your submission would be final_q1_R_Allen.sb3 or final_q1_R Allen.py) [10 marks] Your task Is to write a program that determines how "similiar" a user's name (first and last name) is to your name. A user's name will be assigned a score based on how similar their name is to yours, using the foilowing scoring system: • Beginning similarity: o When the first 3 letters of their name are the same as yours, they get 8 polnts. o When only the first two letters are the same, they get 3 points. o When only the first letter is the same, they get 2 points. o When none of these conditions apply, they get 0 points. • Ending similarity: o When the last two letters of their name are the same as yours, they get 6 points. o When just the last letter is the same, they get 3 points. o When none of these conditions apply, they get 0 points. • Length similarity: o When the length of their name is exactly the same as yours, they get 8 points, otherwise, they get 0 points. o When the length of their name is less than yours, their entire score becomes negative. For example, if my name was "Joe Smith" and the user entered the name "Jane Doe", their score would be -2, as they would get 2 points for beginning similarity, O points for ending similarity, and their score becomes negative since their name is shorter than mine (my name length is 8, theirs is 7). Write a program that does the following: 1. Asks the user for their name. 2. Calculates their score based on the above criteria. 3. Reports to the user what score they got. Submission instructions: • Your program must include a comment at the top with your name and the question number. Your file name should be either final_q1_INITIAL_LASTNAME.sb3 or final q1_INITIAL LASTNAME.py (eg., if your name is Rob Allen, your submission would be final_q1_R_Allen.sb3 or final_q1_R Allen.py)
Expert Answer:
Answer rating: 100% (QA)
Below you can find the code Snapshots of the code WORKING CODE IN C include using namespace std int ... View the full answer
Related Book For
Organic Chemistry
ISBN: 978-1118133576
11th edition
Authors: Graham Solomons, Craig Fryhle, Scott Snyder
Posted Date:
Students also viewed these databases questions
-
Your task is to write a program that will sequentially print the command line arguments to a program, with each argument on a new line. If no arguments have been provided, print this message and exit...
-
Your task is to write a program that will sequentially print the command line arguments to a program, with each argument on a new line. If no arguments have been provided, print this message and exit...
-
Your task is to prepare isopropyl methyl ether by one of the following reactions. Which reaction would give the better yield? Explain your answer. (1) Isopropyl methyl ether Or (2) Isopropyl methyl...
-
What is the "ALDI Way" and what was its quest? Take out costs; eliminate complexity Survival; make enough money to pay overhead costs Increase market share; find more prospective customers Build...
-
If G is a group, prove that for all a, b G, (a) (a-1)-1 = a (b) (ab)-1 = b-1a-1
-
Consider the function and first check that the exponents are unitless. Then show that the Fourier transform of E(t) is You might want to use the integral identity ,-! E(t) = Ege-i@ote-7/27 E(@) =...
-
The Nielsen family formed their corporation, N. Robert Nielsen, Inc., to conduct farming operations. Morre, Grider & Co. is a certified public accounting firm that has provided accounting, tax, and...
-
Recording Seven Typical Adjusting Entries Cardons Boat Yard, Inc., repairs, stores, and cleans boats for customers. It is completing the accounting process for the year just ended, November 30, 2012....
-
A company is planning to manufacture snowboards. The fixed costs are $129 per day and the total costs are $5,897 per daily output of 18 boards. What is the average costs per board tend to as...
-
1. The ura ring is a premium product that offers unique features and is priced higher than the competition. Identify the pricing strategy the company is using. Explain this strategy and discuss why...
-
Suppose the climbing rate of an aircraft, c(h), in feet per minute, is a function of the altitude h in feet. Suppose C(h) is a function of h whose derivative is c(h). That is, C' (h) = dC/dh = c(h)....
-
Need help with these questions. Functions defined outside such as BigInteger class, StringBuilder class, methods from Math class (used as Math.(), such as Math.max(), Math.min(), Math.abs() ... ) or...
-
Write the following as an inequality. -9 is less than x, and 6 is greater than or equal to x Use x only once in your inequality.
-
Ashby, one of Home Depot's suppliers, has a selling price per unit is $12.00, and their variable expense per unit is $7.75, and the break-even sales in dollars is $460,200, what are Ashby's total...
-
Show all steps when solving. A pump uses 2010 3 ftlb (f)/s in order to move water up 150 ft at a rate of 93 lb (m)/s. If there is no change in internal energy of the water from one location to the...
-
Explain how you identified the needs of the learners.r Explanation must be in enough detail to satisfy the assessor that you systematically and consciously used strategies to identify needs. Manual...
-
Bound on this information, what is the amount and percentage of lacerte of degrase that would be shown on a bilonce did with Mearented addy Dole detain s portia makari?
-
You have just begun your summer internship at Omni Instruments. The company supplies sterilized surgical instruments for physicians. To expand sales, Omni is considering paying a commission to its...
-
What experimental conditions would favor the cyclization process in an intramolecular aldol reaction over intermolecular condensation?
-
(a) How many signals would you expect to find in the 1H NMR spectrum of caffeine? (b) What characteristic peaks would you expect to find in the IR spectrum of caffeine? CH3 CH3 Caffeine
-
Write a detailed mechanism for the following reaction. OH OH H2SO4 (cat), H2O HO OH
-
A gene is a segment of DNA that contains the information to produce a functional product. The functional product of most genes is a. DNA. b. mRNA. c. a polypeptide. d. none of the above.
-
Which of the following is not a constituent of a cells proteome? a. An enzyme b. A cytoskeletal protein c. A transport protein in the plasma membrane d. An mRNA
-
The function of the genetic code is to a. promote transcription. b. specify the amino acids within a polypeptide. c. alter the sequence of DNA. d. do none of the above.
Study smarter with the SolutionInn App