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
Imagine you were going to use a dedicated workstation for an animation job rather than a personal PC or the all-purpose PCs you
xeze [42]

Answer:

Explanation:

The three most notable differences that any user will notice between these two would be the following

  1. High-Resolution Display
  2. Specific Hardware (graphics tablet, camera, etc)
  3. Increased Speed

An individual that is working in a career in Animation needs a workstation that is capable of rendering animations which take lots of processing power. Therefore, the workstation would have to be high-end meaning that it will be much faster than a normal personal PC. Animation and Digital Design require a very High-Resolution display and specific hardware to allow you to bring your creations to life and make sure they look as beautiful as possible. All of this is not found in a normal personal PC either.

7 0
2 years ago
he primary purpose of a database query is to a. find and retrieve specific information. b. correct information in the database.
cestrela7 [59]

Answer:

find and retrieve specific information

Explanation:

7 0
2 years ago
In Windows 7's Jump List, what can we do?
olga_2 [115]

Answer:se muestran los documentos recientes, la de iTunes muestra links para abrir la iTunes Store o reproducir toda nuestra colección, etc

Explanation:

4 0
2 years ago
Where do players resurrect if they have been destroyed in a game?
CaHeK987 [17]

Usually back to their start point. Or a random place on the map.

3 0
3 years ago
The number of __________ to your website that had not visited prior to the time frame being analyzed.
liq [111]

Answer:

First Time Unique Visitor

Explanation:

I majored in

4 0
2 years ago
Other questions:
  • What can web designers use to control the individual web page layouts for all of the pages on a website?
    7·1 answer
  • A musical compact disc is an example of
    13·1 answer
  • How to copy single slide to powerpoint
    15·1 answer
  • Technician A says that front and rear U-joints on a RWD axle should operate at different angles to prevent vibration. Technician
    10·1 answer
  • A(n) _____ is a computer program that can damage files and programs on your computer.
    6·2 answers
  • Public-key cryptography can be used for encryption (ElGamal for instance) and key exchange. Furthermore, it has some properties
    9·2 answers
  • SQL statement to verify the updated name field for the publisher with ID 5 SELECT * FROM Publisher WHERE PubID=5;
    7·1 answer
  • You are attempting to upgrade a Windows Server 2008 R2 server to Windows Server 2016 Standard. What must be done in order to acc
    5·1 answer
  • If two egg cells are fertilized what will happen?
    10·1 answer
  • How can Technology be used in marketing?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!