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]
2 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]2 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
A license may limit the use of a software application to a specific device. Group of answer choices True False
BigorU [14]

Answer:

true

Explanation:

8 0
2 years ago
An IT suspects that an unauthorized device is connected to a wireless network. This is a result of pastry sharing on a device br
telo118 [61]

Answer:

3. WiFi Protected Access 2

Explanation:

Given that Wi-Fi Protected Access 2 often referred to as WAP 2 is a form of computer security or privacy measure to ensure that Wireless networks are furnished with powerful security of data network access control.

Hence, when a user employed or utilize WPA2. It gives such a user a high degree of maximum certainty of controlling the users that can have access to his wireless network.

Hence, in this case, what is put in place to stop such activity is Wi-Fi Protected Access 2

6 0
3 years ago
HELP! Identify the parts of the table. <br>A) Primary Key<br>B) Field<br>C) Record<br>D) Table<br>​
joja [24]

The primary key is the block under the Movie ID column.

The Field is the Movie Name.

The Record is the block that goes with the first row of data.

The Table is the bottom block in the center.

4 0
3 years ago
Read 2 more answers
Playstation 4 how to change mtu settings
tamaranim1 [39]
Ask google mam.............
4 0
3 years ago
Developed the first compiler and conducted work that led to the development of COBOL ?
zimovet [89]

Answer:

Grace Hopper.

Explanation:

Grace Hopper was a US Naval Rear Admiral and an American computer scientist who was born on the 9th of December, 1906 in New York city, United States of America. She worked on the first commercial computer known as universal automatic computer (UNIVAC), after the second World War II.

In 1953 at the Remington Rand, Grace Hopper invented the first high-level programming language for UNIVAC 1 by using words and expressions.

Additionally, the high-level programming language known as FLOW-MATIC that she invented in 1953 paved the way for the development of common business-oriented language (COBOL).

Hence, Grace Hopper developed the first compiler and conducted work that led to the development of COBOL.

6 0
3 years ago
Other questions:
  • PLS HELP ASAP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    15·1 answer
  • Ead the following scenario and then answer the question.
    10·1 answer
  • Which statement best represents the denotation for the word “woman”? A woman is an adult human female. Both man and woman are re
    11·2 answers
  • A very simple device that connects network components and sends packets of data to all other connected devices is called a _____
    5·1 answer
  • You have just driven to the Hewlett-Packard site in Corvallis to field-interview a programmer. You sit down in a conference room
    6·1 answer
  • Which wireless communication technology is most likely used when synchronizing device information to an automobile?
    9·1 answer
  • The correct ordering of the seven layers from "top" to "bottom" is
    11·1 answer
  • I need a pro help so no newbies just pro's thank you. I need help I has bean trying to help out with the scams links by putting
    10·1 answer
  • I'm trying to move the figure a little away from, the column line and every time I move it and click ok it goes back to being be
    11·1 answer
  • Which of the following protocols is used by an email client to retrieve messages from an email server, giving users the option t
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!