Answer to Question #306438 in Python for EdiWow

Question #306438

Using Python class Person, write a program that will generate the output below:

Hello, my name is Bob and I am 25 years old!


1
Expert's answer
2022-03-05T06:47:48-0500


class Person:
    # Initializing
    def __init__(self,name,age):
        self.name=name
        self.age=age


    def print(self):
        print(f"Hello, my name is {self.name} and I am {self.age} years old!")
        return self.name




p=Person("Bob",25)
p.print()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS