Skip to content

Commit c15bffa

Browse files
committed
@add day 8 updates
1 parent e6358eb commit c15bffa

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

classes/Word.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ def __init__(self, text):
55

66
def __eq__(self, new_word):
77
return self.text.lower() == new_word.text.lower()
8+
9+
def __repr__(self):
10+
return f"(Word: {self.text})"

classes/word_main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
word_c = Word("b")
66

77
print("A equals B: ", word_a == word_b)
8-
print("B equals C: ", word_b == word_c)
8+
print("B equals C: ", word_b == word_c)
9+
print("A: ", word_a)

0 commit comments

Comments
 (0)