2. Class Implementation. Save your code as lab11_2.py (2-pt). 1) Make a class called User. Create...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
2. Class Implementation. Save your code as lab11_2.py (2-pt). 1) Make a class called User. Create two attributes called first_name and last_name, and then create two more other attributes that are typically stored in a user profile. 2) Make a method called describe_user() that prints a summary of the user's information. 3) Make another method called greet_user() that prints a personalized greeting to the user. 4) Create two instances representing different users, and call both methods for each user. Example Output Tom Cat Username: t_cat Email: t_cat@QCC.cuny.com Location: Bayside Welcome back, t_cat! Jerry Mouse Username: jmouse1122 Email: jmouse1122@example.com Location: New York Welcome back, jmouse1122! I 2. Class Implementation. Save your code as lab11_2.py (2-pt). 1) Make a class called User. Create two attributes called first_name and last_name, and then create two more other attributes that are typically stored in a user profile. 2) Make a method called describe_user() that prints a summary of the user's information. 3) Make another method called greet_user() that prints a personalized greeting to the user. 4) Create two instances representing different users, and call both methods for each user. Example Output Tom Cat Username: t_cat Email: t_cat@QCC.cuny.com Location: Bayside Welcome back, t_cat! Jerry Mouse Username: jmouse1122 Email: jmouse1122@example.com Location: New York Welcome back, jmouse1122! I
Expert Answer:
Answer rating: 100% (QA)
class User def initself firstname lastname username email lo... View the full answer
Related Book For
Posted Date:
Students also viewed these operating system questions
-
Grand Vision GrandVision is largely the amalgamation of a number of optical chains that have enjoyed steady year-on-year growth, which has come from opportunities in existing and new markets....
-
"internet radios" for streaming audio, and personal video recorders and players. Describe design and evaluation processes that could be used by a start-up company to improve the usability of such...
-
discuss case study a bout remote analysis during covid 1 9 - 1 9 virus
-
Knitline Inc. produces high-end sweaters and jackets in a single factory. The following information was provided for the coming year. A sales commission of 5% of sales is paid for each of the two...
-
During 2019, Jill, age 39, participated in a Section 401(k) plan which provides for maximum employee contributions of 12 percent. Jills salary was $80,000 for the year. Jill elects to make the...
-
Suppose that in September 2013 a company takes a long position in a contract on May 2014 crude oil futures. It closes out its position in March 2014. The futures price (per barrel) is \($88.30\) when...
-
Simmons Corporation owns stock of Armstrong, Inc prior to 2010 the investment was accounted for using the equity method. In early 2010, Simmons sold part of its investment in Armstrong, and began...
-
A 3.0-cm tall object is 55 cm in front of a diverging mirror that has a -20 cm focal length. Part A Calculate the image position. Input a positive value if the image is on the same side from the...
-
Prepare Trial Balance? Angela Mosely owns Innovative Designs. The Accounts and their balances for the Trial Balance of the first for January 31, 20X1, the first month of operation, are shown below....
-
Virunga Co uses the net present value (NPV) method, the internal rate of return (IRR) method and discounted payback period (DPP) to appraise its new investment opportunities. An investment...
-
Find the equation of the line between the points (2, 3) and (4,-1)
-
On November 1, Alpha Corporation agreed to provide services to Delta Company for $9,000. On December 31, two-third of the work was substantially completed, but no payment was received. What entry...
-
Precision Watches purchases a luxury watch from Germany, including insurance and shipping costs, for $620 per unit. The markup on the watch is 40% for a sales price of $868. Other traceable direct...
-
Total Costs $150000 Total Fixed Costs Unknown Total Variable Costs $89000 Total Revenue $179000 Determine the total fixed costs (in dollars), Determine the profit earned (in dollars), Determine the...
-
Solve the equation by completing the square: z - 4z +20 = 5
-
You are responsible for designing the audit of notes receivable for Hickory Appliance Retailers, which sells appliances and electronics to consumers for their homes or small businesses. Hickory...
-
Consider the setup in Problem 16. Show that the relative speed of the ball and the point of contact on the stick is the same before and immediately after the collision. (This result is analogous to...
-
If a text boxs TabIndex value is 12, its identifying labels TabIndex value should be _____________________. a. 11 b. 12 c. 13 d. True
-
Which of the following If clauses compares the string contained in the txtId control with the abbreviation for the state of Georgia? a. If ToUpper(txtId.Text.Trim) = "GA" Then b. If...
-
Open the Martins Solution.sln file contained in the VB2017\AppC\Martins Solution folder. Use what you learned in the appendix to debug the application.
-
Orvil Companys net profit margin percentage is 4.5%, its total asset turnover is 2.4, and its equity multiplier is 1.5. What is the companys return on equity? a. 2.8% b. 7.2% c. 16.2% d. 10.7%
-
Obtain the most recent annual report or SEC filing 10-K of a publicly traded company that interests you. It may be a local company or it may be a company in an industry that you would like to know...
-
Endless Mountain Company manufactures a single product that is popular with outdoor recreation enthusiasts. The company sells its product to retailers throughout the northeastern quadrant of the...
Study smarter with the SolutionInn App