Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer using Python import sys and sys argv Create a program called classname.py. The program should define a class called person that has one

Please answer using Python import sys and sys argv

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:

The first blank should be the name attribute

The second blank should be the name of the class

After defining the class, there are three things you must do:

Instantiate an object of the class

Run the hello method of the instantiated object

(e.g., Greg.hello())

For grading purposes, you must also print the name of the class so I can be sure you've created a class

(The expected output is )

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transport Operations

Authors: Allen Stuart

2nd Edition

978-0470115398, 0470115394

Students also viewed these Programming questions