These are chat archives for andela/andela-21-lite

Aug 2016
Aug 26 2016 13:48
This message was deleted
Aug 26 2016 13:55

@Antoh1 yea that works I had missed that. We can store the if statement in another method instead like so, as many as we want, this would be more readable

class Person:


    def __init__(self,initialAge):
         self.age = initialAge

    # Check whether age is greater than 1
    def  age_validity():
         if initialAge <1:
              print("Age must be above 0")
              initialAge = 0

    def  yearPasses():
         self.age = self.age + 1

@/all anyone with any thoughts hehe