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
k0ka [10]
3 years ago
11

Write a class definition line and a one line docstring for the class Dog. Write an __init__ method for the class Dog that gives

each dog its own name and breed. Test this on a successful creation of a Dog object. >>> import dog >>> sugar
Computers and Technology
1 answer:
Viefleur [7K]3 years ago
4 0
Python Code:

class Dog:
""" Dog class definition """

# data attribute species as part of the class Dog
species = "Canis familiaris"

def __init__(self, _name, _breed):
""" Constructor """
# Assigning values
self.name = _name
self.breed = _breed
self.tricks = []

def teach(self, trick):
""" add a passed string parameter to tricks """
# Adding to list
self.tricks.append(trick)
# Printing message
print(self.name + " knows " + trick)


def knows(self, chkStr):
""" check whether a passed string parameter is in the dog’s list of tricks """
# Checking in tricks list
if chkStr in self.tricks:
# Printing message
print("Yes, " + self.name + " knows " + chkStr)
else:
# Printing message
print("No, " + self.name + " doesn't know " + chkStr)
You might be interested in
What's the difference between an exe file and an msi file?
tatiyna

Answer: <u>EXE files are mainly used to indicate that the file is executable</u>

<u>MSI files show that the file is a Windows Installer</u>

<u />

Explanation:

EXE files are mainly used to indicate that the file is executable

MSI files show that the file is a Windows Installer

<u>MSI files are only used with launchers, EXE does not need to be used with launchers </u>

Hope this helped :)

5 0
2 years ago
Which of the following is the estimate of the minimum amount of time it would take to perform a task? (Points : 2) Minimal durat
kondor19780726 [428]

Answer:

Optimistic duration

Explanation:

The following three concepts are Project management concepts:

Optismitic duration: Estimation of the shortest duration of a task, taking into account the difficulty, etc.

Pessimistic duration: Estamation of the longest duration of a task, taking into account the difficulty, etc

Expected duration: Expected duration of a task, kind of a compromise between the optmistic duration and the pessimistic duration.

Which of the following is the estimate of the minimum amount of time it would take to perform a task?

The answer is Optimistic duration

7 0
3 years ago
What is the device that converts the signals to and from the wires so that the data can be sent and received by the computer?
netineya [11]

Answer:

E. Modem

Explanation:

A network comprises of two or more interconnected devices such as computers, routers, switches, smartphones, tablets, etc. These interconnected devices avail users the ability to communicate and share documents with one another over the network.

In order for a network to exist or be established, the devices must be turned (powered) on and interconnected either wirelessly or through a cable (wired) connection.

In Computer Networking, a node is the physical device that make up a network and are capable of sending, receiving, creating and storing data in communication.

Examples of network nodes are routers, hubs, computer, switches, smartphone, printers, modem, etc.

A modem is a networking device that converts the signals to and from the wires such as a telephone line, so that the data can be sent and received by the computer.

Basically, a modem is an abbreviation for modulator and demodulator and as such it is designed to convert signal from one network device to signals that another network device such as a computer can understand or read.

When sending a signal (data) over a network, a modem converts (modulate) digital data signal to an analogue signal and transmits it over a telephone line or other communication lines. Also, when receiving an analogue signal, a modem converts (demodulate) the signal to a digital data signal.

8 0
3 years ago
Evaluating how current, credible, and unbiased a source is ensures:
Tanya [424]

The answer is

A. your information is more accurate and useful

I hope it helps you. Please mark me brainliest answer.

6 0
3 years ago
_____ involves identifying and controlling the functional and physical design characteristics of products and their support docu
slamgirl [31]

Answer:

The correct answer to the following question will be Option C (Configuration management).

Explanation:

  • A method of device engineering to create and maintain continuity of the functionality, operational and physical characteristics of software with its specifications, configuration and operating details across its existence.
  • You will gain profit from:

Decreased risk of interruptions and data leaks through accessibility and keeping track of adjustments to your devices by implementing configuration management.

The remaining three solutions will not be capable of performing these functions. Therefore, the correct answer is alternative C Configuration management.

5 0
3 years ago
Other questions:
  • What is heat sink?what is its use?If it is not in the system what will happen?
    12·1 answer
  • a one-two paragraph summary on the Running Queries and Reports tutorials. Apply critical thinking and an academic writing style
    6·1 answer
  • When you use your fingerprint on a reader attached to your computer to authenticate yourself as the legitimate computer user, wh
    6·1 answer
  • The process of sending ping requests to a series of devices or to the entire range of networked devices is called a:
    9·1 answer
  • You are an administrator for a large corporation and you are responsible for deploying computers often and quickly. Which server
    5·1 answer
  • What formula would you enter to add the values in cells b4, b5, and b6?
    10·1 answer
  • Hey Yo, i need some help, Whats 2+2?
    7·2 answers
  • Cuál es el objetivo principal de una clave primaria?
    14·1 answer
  • 500 word career report, auto care
    15·1 answer
  • 11. a) What is character size measured in?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!