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
max2010maxim [7]
3 years ago
9

Add a data attribute tricks of type list to each Dog instance and initialize it in __init__ to the empty list. The user does not

have to supply a list of tricks when constructing a Dog instance. Make sure that you test this successfully. >>> sugar.tricks []
Computers and Technology
1 answer:
Olenka [21]3 years ago
7 0

Answer:

Following are the method to this question:

def __init__(self, _name, _breed):#defining Constructor

       """ Constructor """

       self.name = _name#assigning value in name variable

       self.breed = _breed#assigning value in breed variable

       self.tricks = []#defining tricks an empty list

Explanation:

In the above code, a parameterized constructor is defined, that hold two-variable "name and breed" in its parameter, and another object self is created for storing the value.

Inside the constructor two-variable, and one empty list variable "tricks" is defined that hold value in the name and breed variable, and the next step an empty list is defined, that store its value.

You might be interested in
Which of the following BEST describes a permissive software license?
Olegator [25]

Answer:

B

Explanation:

A permissive software license is a free-software license which carries a minimal restrictions on how the software can be used, modified, and redistributed, usually including a warranty disclaimer.

I hope this helps.

Please rate me brainliest.

8 0
2 years ago
A good website design combines which of the following elements? (select all that apply) powerful web server hardware components
Anarel [89]

Sounds like it'd be all of the above.


7 0
3 years ago
Read 2 more answers
What is cyber safety?
mario62 [17]

Answer: Cyber safety is a process that protects computers and networks. The cyber world is a dangerous place without security and protection.

Explanation: Hope this helps!

7 0
3 years ago
Which step creates a connection between a file and a program in python?
Mandarinka [93]
<span>The step of opening a file creates a connection between a file and a program.Opening an output file usually creates the file on the disk and allows the program to write data to it.Opening an input file allows the program to read data from the file.</span>
5 0
3 years ago
What would be the output of system.out.println("fun\tny");
netineya [11]

Answer:

use google

Explanation:

8 0
3 years ago
Other questions:
  • To copy text in a Word document to an Excel spreadsheet, you should first format the text as a Word table or as text separated b
    11·2 answers
  • Troubleshooting a printer that does not work includes a. connecting the printer to your computer b. checking to see if there is
    13·1 answer
  • How have productivity programs improved the professional lives of people? (check all that apply)
    8·2 answers
  • Which key should you press and hold to select multiple cells?
    8·2 answers
  • before Katie turns in the paper she typed she wants a peer to review it and give her feedback Katie uses her all in one printer
    10·1 answer
  • What do we call data that's broken down into bits and sent through a network?
    15·1 answer
  • An EULA usually takes the form of an electronic notification that appears when installing software. The user then has a choice t
    14·1 answer
  • Tommy loves taking care of homing pigeons. He sent a note to his crush who lives 24.0 km away from his house. These birds fly at
    9·1 answer
  • X274: Recursion Programming Exercise: Cannonballs Spherical objects, such as cannonballs, can be stacked to form a pyramid with
    7·1 answer
  • 12. Why is it so important to pay attention to your digital reputation?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!