Skip to content

Commit

Permalink
'Solution_v1.01'
Browse files Browse the repository at this point in the history
  • Loading branch information
DmytroPieskov committed Nov 10, 2024
1 parent 76afea5 commit babc540
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,18 @@ class ChildrenSlideLimitationValidator(SlideLimitationValidator):
height = IntegerRange(min_amount=80, max_amount=120)
weight = IntegerRange(min_amount=20, max_amount=50)

def __init__(self, age: int, weight: int, height: int) -> None:
super().__init__(age, weight, height)


class AdultSlideLimitationValidator(SlideLimitationValidator):
age = IntegerRange(min_amount=14, max_amount=60)
height = IntegerRange(min_amount=120, max_amount=220)
weight = IntegerRange(min_amount=50, max_amount=120)

def __init__(self, age: int, weight: int, height: int) -> None:
super().__init__(age, weight, height)


class Slide:
def __init__(self, name: str,
Expand All @@ -59,3 +65,7 @@ def can_access(self, visitor: Visitor) -> bool:
return True
except (ValueError, TypeError):
return False


Vasia = Visitor("Vasia", age=35, weight=150, height=120)
print(Vasia)

0 comments on commit babc540

Please sign in to comment.