subject

In this code, there's a Person class that has an attribute name, which gets set when constructing the object. Fill in the blanks so that 1) when an instance of the class is created, the attribute gets set correctly, and 2) when the greeting() method is called, the greeting states the assigned name. mtino 1-class Person: 2 - def __init__(self, name): self. name = def greeting(self): # Should return "hi, my name is " followed by the name of the Person. return Run 8 # Create a new instance with a name of your choice 9 some_person = 10 # Call the greeting method 11 print (some_person. ) 12 Press ESC to exit the code block at any time

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:00
Is it ok to use a does red wine clean the inside of a computer true or false
Answers: 2
question
Computers and Technology, 22.06.2019 05:00
Write a loop that reads positive integers from standard input and that terminates when it reads an integer that is not positive. after the loop terminates, it prints out, on a line by itself and separated by spaces, the sum of all the even integers read, the sum of all the odd integers read, a count of the number of even integers read, and a count of the number of odd integers read, all separated by at least one space. declare any variables that are needed. assume the availability of a variable, stdin, that references a scanner object associated with standard input. that is, stdin = new scanner(system.in); is given.
Answers: 3
question
Computers and Technology, 22.06.2019 08:00
Aplan to budget time for studying and activities is referred to as a study routine. study habits. study skills. a study schedule.
Answers: 1
question
Computers and Technology, 23.06.2019 06:40
What are the three uses of a screw?
Answers: 2
You know the right answer?
In this code, there's a Person class that has an attribute name, which gets set when constructing th...
Questions
question
Physics, 30.03.2021 01:00
question
Mathematics, 30.03.2021 01:00
question
History, 30.03.2021 01:00
Questions on the website: 13722363