diff --git a/Project 1/Project 1.pdf b/Project 1/Project 1.pdf new file mode 100644 index 0000000..25611b5 Binary files /dev/null and b/Project 1/Project 1.pdf differ diff --git a/Project 2/Card.py b/Project 2/Card.py index e81bf42..e972c1a 100644 --- a/Project 2/Card.py +++ b/Project 2/Card.py @@ -32,8 +32,12 @@ class Card: def __add__(self, other) -> int: #Adding 2 cards together if isinstance(other, Card): - return self.value + other.value + return self._value + other._value elif isinstance(other, int): #allows adding a card to an int - return self.value + other + return self._value + other + return NotImplemented + + def __radd__(self, other) -> int: + return self.__add__(other) #Added for project 2: Created an "__add__" meathod to allow adding Cards together. diff --git a/Project 2/Project 2.pdf b/Project 2/Project 2.pdf new file mode 100644 index 0000000..299fe4c Binary files /dev/null and b/Project 2/Project 2.pdf differ diff --git a/Project 2/__pycache__/Card.cpython-314.pyc b/Project 2/__pycache__/Card.cpython-314.pyc index 6881390..0e090c1 100644 Binary files a/Project 2/__pycache__/Card.cpython-314.pyc and b/Project 2/__pycache__/Card.cpython-314.pyc differ