It looks like you're new here. If you want to get involved, click one of these buttons!
#!/usr/bin/env python
'''
Python Object Oriented Programming example number three
We will be using a simple person example
'''
class HumanPerson(object):
def __init__(self, name, age, sex):
self.name = name
self.age = age
self.sex = sex
def PrintHuman(self):
print(\"Name: \" + self.name)
print(\"Age: \" + self.age)
print(\"Sex: \" + self.sex)
print(\"Status: \" + self.status)
name = raw_input(\"Enter your name: \")
age = raw_input(\"Enter your age: \")
sex = raw_input(\"Sex: \")
status = raw_input(\"Status(EG happy/sad): \")
humaninit = HumanPerson(name, age, sex)
humaninit.status = status #Notice how we don't define this in __init__
humaninit.PrintHuman()