Skip to content

Commit

Permalink
updating HW5
Browse files Browse the repository at this point in the history
  • Loading branch information
vitoriarlima committed Oct 31, 2021
1 parent fb69860 commit 34d1152
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
17 changes: 8 additions & 9 deletions homework/HW5/HW5-final/animal.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,13 @@ def species(self, into):
self._species = into


>>> dog = Animal('Fido', 'dog')
>>> vars(dog)
dog = Animal('Fido', 'dog')
print(vars(dog))

>>> dog = Animal('Fido', 'dog')
>>> dog.species

>>> dog.species = 'cat'
>>> dog.species

>>> dog.species = 'TheThing'
dog = Animal('Fido', 'dog')
print(dog.species)
dog.species = 'cat'
print(dog.species)

dog.species = 'TheThing'
print(dog.species)
6 changes: 4 additions & 2 deletions homework/HW5/HW5-final/binary_search_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ def _size(node):
print(greektoroman.put('Eros', 'Cupid'))
print(greektoroman.put('Aphrodite', 'Venus'))
print(greektoroman.get('Eros'))


print(greektoroman)

print(greektoroman.get('Vitoria'))
print(greektoroman.get('Lala'))

print (greektoroman)

0 comments on commit 34d1152

Please sign in to comment.