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
-
When does business diversification become a consideration for companies? What are the three tests that justify a business diversification decision? Which is better, related business diversification...
-
ok ht nt ences Weller Company's budgeted unit sales for the upcoming fiscal year are provided below: 1st Quarter Budgeted unit sales 17,000 2nd Quarter 3rd Quarter 4th Quarter 20,000 16,000 15,000...
-
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...
-
Physicians conducted an experiment to investigate the effectiveness of external hip protectors in pre-venting hip fractures in elderly people. They randomly assigned some people to get hip protectors...
-
A corporation has taxable income of $1,500,000. If it distributes its after-tax income to its shareholders whose dividend tax rate is 15 percent, what are the total tax and the combined effective tax...
-
What problems can occur with encoding a message?
-
Standard Pump recently won a $14 million contract with the U.S. Navy to supply 2000 custom-designed submersible pumps over the next four months. The contract calls for the delivery of 200 pumps at...
-
Question 3 9 of 7 5 . Corporal Liana Jackson is domiciled in Virginia. In 2 0 2 2 , she was stationed in California all year on permanent change of station orders. She earned $ 5 5 , 0 0 0 in...
-
"Part 1: The Performance Lawn Equipment database contains data needed to develop a pro forma income statement. Dealers selling PLE products all receive 18% of sales revenue for their part of doing...
-
Calculate Carla Vista Company's gross margin ratio using: ( Round answers to 2 decimal places, e . g . 6 1 . 0 5 % . ) i . FIFO ii . Weighted - average Which cost formula produced the higher gross...
-
How is effective communication important in relation to Environmental Management System?Explain
-
Jones, a department manager, exercises control over the department's costs. Following is selected information relating to the department for July: Variable factory overhead Budgeted based on standard...
-
1- Calculate the value of A (Accumulator) by using hexadecimal number system at the end of logical and arithmetic operations listed below. Please show the related operational remarks for each...
-
(XII) At which points. drawn to it on parallel to 2 Z +2y+32 = 21 re the tangent planes x+4y+62 =0 ?
-
Which environmental factor profoundly affects babies, but is mild in mothers? Explain in detail.
-
(1 point) A medical researcher wants to investigate the amount of time it takes for patients' headache pain to be relieved after taking a new prescription painkillem She plans to use statistical...
-
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...
-
What is an impairment of a tangible capital asset? How is a depreciable capital asset impairment recorded in the financial statements?(Appendix)
-
Refer to Exhibit 1, which shows the segment information of Goodyear Tire & Rubber Company. In what business segments does Goodyear operate? What is the relative size of its business segments in terms...
-
In a dramatic move, Standard & Poors Ratings Group, the large financial company that evaluates the riskiness of companies debt, downgraded its rating of General Motors and Ford Motor Co. debt to junk...
Study smarter with the SolutionInn App