Write a program to validate a user-entered email address. Input: Ask the user to enter an...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program to validate a user-entered email address. Input: Ask the user to enter an email address Rules: • Valid email addresses use the username@websitename.extension format . The username can only contain letters, digits, dashes and underscores. It must have a length of 1 or greater. .The websitename can only have letters and digits. Length is >= 1 For this exercise: assume the valid extensions are gov; com; and edu Output: The original string and a message on whether it is a valid email address. Rubric: . The program uses comments to clearly document what the program is doing and support future maintenance - 10 points • The program effectively uses functions (e.g. each function performs one task 10 points The program successfully validates usernames . The program successfully validates website names > points • The program successfully validates the extension - 20 points The program meets the specifications - 20 points Write a program to validate a user-entered email address. Input: Ask the user to enter an email address Rules: • Valid email addresses use the username@websitename.extension format . The username can only contain letters, digits, dashes and underscores. It must have a length of 1 or greater. .The websitename can only have letters and digits. Length is >= 1 For this exercise: assume the valid extensions are gov; com; and edu Output: The original string and a message on whether it is a valid email address. Rubric: . The program uses comments to clearly document what the program is doing and support future maintenance - 10 points • The program effectively uses functions (e.g. each function performs one task 10 points The program successfully validates usernames . The program successfully validates website names > points • The program successfully validates the extension - 20 points The program meets the specifications - 20 points
Expert Answer:
Answer rating: 100% (QA)
Heres a breakdown of the program along with an explanation Comments The rubric mentions that comments are important for documenting and explaining the code Heres an example of how you can include comm... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
On April 1, 2014, Briggs Corp. purchases a 24-month property insurance policy for $72,000. The policy is effective immediately. Assume that Briggs prepares adjusting entries only once a year, on...
-
On January 2, 2016, Trendz Lighting purchased showroom fixtures for $20,000 cash, expecting the fixtures to remain in service for four years. Trendz Lighting has depreciated the fixtures on a...
-
Paul had type B-negative blood. It is extremely rare. As a consequence, when the blood bank received a request for that type, it called Paul and orally promised to pay him $645 per pint. Paul gave...
-
Increasingly, we are seeing email used in cases involving defendants located in foreign countries. Plaintiffs filed suit against four Defendants: Qingdao Sunflare New Energy Co., Skone Lighting Co.,...
-
Southwestern University (SWU), a large state college in Stephenville, Texas, 30 miles southwest of the Dallas/Fort Worth metroplex, enrolls close to 20,000 students. In a typical town-gown...
-
Unusual shapes! At this point, we've gotten pretty comfortable with calculating the perimeter and area of squares and rectangles. In this assignment, we'll make a program that calculates these values...
-
A company contemplating the acceptance of a special order has the following unit cost behavior, based on 10000 units: $ Direct materials 4 Direct labor 10 Variable overhead 8 Fixed overhead 6 A...
-
5. Can you incorporate open-source code from a GitHub forum into an Infosys proprietary tool? Oa. Yes, since it is freely available, it is assumed safe for use in proprietary tools. Ob. No, Infosys...
-
Misinformation refers to intentionally stating or circulating inaccurate information, on the other hand while Disinformation refers to something that is not true. O True False
-
define interviews research strategy in line with interpretivism research philosophyand indicate the reasoning for its use in supply chain management challenges and add source fo this.
-
A Which is the best way to meet stakeholders' expectations? A O Host team building sessions with stakeholders. B C D O Keep stakeholders regularly informed throughout the project. Hold weekly status...
-
The transactions demand for holding money is when people hold money: To transact purchases they expect to make. As insurance against unexpected expenses. Instead of near money. To speculate in the...
-
How far from a convex mirror must a pencil be held to form an image of half: 1 pencil size? the radius of the mirror is 40 cm.
-
Problem 3.5 (4 points). We will prove, in steps, that rank (L) = rank(LT) for any LE Rnxm (a) Prove that rank (L) = rank (LTL). (Hint: use Problem 3.4.) (b) Use part (a) to deduce that that rank(L) =...
-
Ray and Maria Gomez have been married 3 years. They live at 1610 Quince Ave., McAllen, TX 78701. Ray works for Palm Oil Corporation and Maria works for the City of McAllen. Maria's Social Security...
-
For each of the following situations, indicate whether the taxpayer(s) is (are) required to file a tax return for 2012. Explain your answer. a. Helen is a single taxpayer with interest income in 2012...
-
In 2012, Michael has net short-term capital losses of $2,000, a net long-term capital loss of $45,000, and other ordinary taxable income of $45,000. a. Calculate the amount of Michael's deduction for...
-
A certain radar has the following specifications: pulse width \(\tau^{\prime}=1 \mu\) s, antenna beam width \(\Omega=1.5^{\circ}\), and wavelength \(\lambda=3 \mathrm{~cm}\). The radar antenna is...
-
One implementation of a single delay line canceler with feedback is shown below. (a) What is the transfer function, \(H(z)\) ? (b) If the clutter power spectrum is \(W(f)=w_{0} \exp \left(-f^{2} / 2...
-
(a) Derive an expression for the impulse response of a single delay line canceler. (b) Repeat for a double delay line canceler.
Study smarter with the SolutionInn App