1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
maria [59]
3 years ago
11

Provide a class Letter for authoring a simple letter. In the constructor, supply the names of the sender and the recipient: def

__init__(self, letterFrom, letterTo) Supply a method
Computers and Technology
1 answer:
STatiana [176]3 years ago
4 0

Answer:

class Letter:

   header="Dear "

   footer="Sincerely, \n"

   text=""

   def __init__(self,letterFrom,letterTo):

       self.header+=letterTo + ":\n\n"

       self.footer+=letterFrom + "\n"

   

   def getText(self):

       return self.header+self.text+self.footer

   def addLine(self,line):

       self.text+=line+"\n\n"

l = Letter("Cain", "Abel")

l.addLine("I am very happy to be writing to you at this joyful moment of my life.")

I.addLine("I am really sorry i killed you, I was a saddist back then.")

print(l.getText())

Explanation:

The Letter class a used to write a letter. The magic method "__init__" is used as a constructor to accept the sender and the recipient of the letter. The addLine method is called on an instance of the class to add string lines to the object while the getText method returns the entire written letter.

You might be interested in
After assembling a computer system the very first software to be installed is​
tatyana61 [14]

Answer:

operating system is the very first

after assembling a computer system the very first software to be installed is

8 0
4 years ago
Read 2 more answers
What is mouse and how many types of mouse are there​
bekas [8.4K]

Answer:

a mouse is the object that controls the cursor on your computer/laptop, there's one standard type of mouse, but there are thousands of makes and models.

Explanation:

3 0
3 years ago
A developer wants to take existing code written by another person and add some features specific to their needs. Which of the fo
anzhelika [568]

Answer:

open-source

Explanation:

open-souce software allows any user to submit modifications of the source code

7 0
3 years ago
Does the child in the crosswalk have the right of way? Explain why or why not.
qwelly [4]
A pedestrian always has the right of way when crossing a street in a crosswalk
3 0
3 years ago
You have answered 12 of 23 questions.
baherus [9]

Answer:

the answer is a network because the others are for different things

6 0
3 years ago
Other questions:
  • When resizing images or objects in a presentation, why should a user not utilize the sizing handles in the middle of the sides
    5·2 answers
  • What cell phone technology is the most popular in the united states?
    8·2 answers
  • The refresh or reload button is in the browser toolbar and usually looks like a pair of curved arrows. Clicking it will ________
    14·2 answers
  • In financial language, a “quarter” is one quarter of a year, or three months. Your annual sales are $123,000. The sales are spre
    5·2 answers
  • ___________ is a task pane used to correct grammar errors; opens when you click the Spelling & Grammar button in the Proofin
    15·2 answers
  • Which of the following is a benefit of using a parallel circuit system?
    12·1 answer
  • What is the output?
    12·1 answer
  • write a c program to insert and delete values from stack( to perform pop and push operations) using an array data structure
    8·1 answer
  • Name two devices that use control knobs to set the level of gadget​
    15·1 answer
  • ______ is where a media company uses its combined properties to promote each other and add value to the company.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!