Answer to Question #241224 in Python for Dokime

Question #241224

Write a progrWrite a program which creates a class named person with four methods. am which creates a class named person with four methods. 


1
Expert's answer
2021-09-24T00:03:39-0400
class Person:
    
    def married(self):
        print("You are married.")


    def child(self):
        print("You are a child.")


    def adult(self):
        print("You are an adult.")


    def work(self):
        print("You are working.")




p1=Person()
p1.adult()
p1.work()

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