def __init__(self, post_str, username, ratings, option): Post.__init__(self, post_str, username) self.ratings = ratings self.option = option count = 0 rating = 0 for r in ratings: rating += float(r) count += 1 self.rating = f"{(rating/count):.2f}"
def __init__(self, post_str, username, body_part): Post.__init__(self, post_str, username) self.body_part = body_part
def __init__(self, post_str, username): Post.__init__(self, post_str, username)