"""
This is first python3 script code for lyp in Bokeyuan
__author__="lyp"
2018.0920
""" class PersonInfo:
def __init__(self,name=None,age=None,gender=None,career=None):
self.name=name
self.age=age
self.gender=gender
self.career=career def hello_world(self):
print("Hello World!\nHello Bokeyuan!\nBetter World and Better Day!")
return(1)
def prin_info(self):
print("My name is {}.".format(self.name))
print("I am {} years old.".format(self.age))
print("I am a {}.".format(self.gender))
print("My career is {}, and I love python.".format(self.career))
return(1) def main():
lyp=PersonInfo(name="lyp",age=27,gender="Man",career="AE")
lyp.hello_world()
lyp.prin_info() if __name__=="__main__":
main()
04-30 00:55