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
Which term describes the order of arrangement of files and folders on a computer?
Pani-rosa [81]

Answer:The term that describes the order of arrangement of files and folders on a computer is organization. It is very important the organization of the files and folders to be effective, in order to work with them quickly and efficiently

Explanation:

hope this help sry if it doesn't.

5 0
3 years ago
Are used to connect a computer to a telephone line for dial-up internet access
Stella [2.4K]
I mean it typically goes wall jack to filter to line...
5 0
4 years ago
An online museum is creating a site hosting hundreds of thousands of digital representations of art from around the world. The w
Firdavs [7]

Answer:

A. the museum can choose a heuristic approach which will achieve a lossless compression, but they cannot be sure that it is the most efficient compression for each image

C. algorithms for lossless compression exist, so the museum can use those to compress the image

Explanation:

4 0
3 years ago
What language do the Vikings speak in the game " For Honor"?
aivan3 [116]
In the game the Vikings speak icelandic
3 0
3 years ago
Read 2 more answers
HELP is web designing a career in graphic design yes or no?
Ilya [14]

Answer:

Web Design, just like Graphic Design, is the creation of graphics, typography, graphs, and images to communicate an idea. However, Web Design only concerns websites, not print. ... They also have to take their designs and turn them into a working website, which involves programming.

Explanation:

In other words no

6 0
3 years ago
Other questions:
  • The term____relates to all things that we see.
    13·1 answer
  • Which server-based authentication protocol would be best for an organization that wants to apply authorization policies on a per
    15·1 answer
  • Which sort algorithm does the following outline define? for i between 0 and number_used-1 inclusivea. sequential b. non-sequenti
    13·1 answer
  • InJava garbage collection is done by_______________JVM (Java VirtualMachine)ProgrammerBoth JVM (Java Virtual Machine)and Program
    9·1 answer
  • MORE FREEE POINTS AYEEE
    7·2 answers
  • oftware that is free and whose code can be accessed and potentially modified by anyone is referred to as _____. shared source fi
    11·1 answer
  • Which of these statements is true?
    9·1 answer
  • This activity will help you meet these educational goals:
    9·1 answer
  • IBC Question: You are writing a JavaScript program for Blue Yonder Airlines. The program stores various information about the ai
    13·1 answer
  • Question 3 of 10
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!