classname.py • Create a program called classname.py. The program should define a class called person that has one method called hello, and one attribute called name, which represents the name of the...


Using import sys : Create a python program called classname.py. The program should define a class
called person that has one method called hello, and one attribute called name,
which represents the name of the person.


classname.py<br>• Create a program called classname.py. The program should define a class<br>called person that has one method called hello, and one attribute called name,<br>which represents the name of the person.<br>• The hello method should print the following string to the screen:<br>'My name is<br>and I am a<br>where:<br>o The first blank should be the name attribute<br>o The second blank should be the name of the class<br>o The above blanks should NOT be manually printed (ex. print('My name is<br>Greg and I am a person'))<br>• After defining the class, there are three things you must do:<br>1. Instantiate an object of the class<br>2. Run the hello method of the instantiated object<br>a. (e.g., Greg.hello())<br>3. For grading purposes, you must also print the name of the class so I can be sure<br>you've created a class<br>a. (The expected output is <class'_main_.person'>)<br>

Extracted text: classname.py • Create a program called classname.py. The program should define a class called person that has one method called hello, and one attribute called name, which represents the name of the person. • The hello method should print the following string to the screen: 'My name is and I am a where: o The first blank should be the name attribute o The second blank should be the name of the class o The above blanks should NOT be manually printed (ex. print('My name is Greg and I am a person')) • After defining the class, there are three things you must do: 1. Instantiate an object of the class 2. Run the hello method of the instantiated object a. (e.g., Greg.hello()) 3. For grading purposes, you must also print the name of the class so I can be sure you've created a class a. (The expected output is )

Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here