コード例 #1
0
 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}"
コード例 #2
0
ファイル: workout_post.py プロジェクト: djd6621/BrickHack6
 def __init__(self, post_str, username, body_part):
     Post.__init__(self, post_str, username)
     self.body_part = body_part
コード例 #3
0
 def __init__(self, post_str, username):
     Post.__init__(self, post_str, username)