Create a person #
Create a Person class to have properties and methods satisfying all the tests.
Tests #
- A
Personobject is created with the codeperson = Person("samson craig", 30, "male", "software engineer")person.first_nameshould be"Samson". Make sure the case is right.person.last_nameshould be"Craig". Make sure the case is right.person.ageshould be30person.occupationshould be"software engineer"person.introduce()should print the message"Hello, my name is Samson. I am 30 years old. I am a male working as a software engineer."person.celebrate_birthday()should increase theageproperty by1person.introduce()should print the message"Hello, my name is Samson. I am 31 years old. I am a male working as a software engineer."afterperson.celebrate_birthday()person.change_job("data analyst")should set theoccupationproperty to"data analyst"person.introduce()should print the message"Hello, my name is Samson. I am 31 years old. I am a male working as a data analyst."afterperson.celebrate_birthday()
Getting Started with Python
Data Types
Python Functions
Statements in Python
Basic Debugging in Python
Basic Algorithm
Object-Oriented Programming
Error Handling
Intermediate Algorithm
Python Modules