Skip to content

Commit 26a10c1

Browse files
author
Shehab Abdel-Salam
committed
Release 1.0.0 🎉
1 parent f3417e5 commit 26a10c1

File tree

9 files changed

+20
-39
lines changed

9 files changed

+20
-39
lines changed

CHANGELOG.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
55

66
## Unreleased
77

8-
## [0.1.0] - 2024-08-28
8+
## [1.0.0] - 2024-10-17
99

10-
### Added
10+
### Changed
1111

12-
- First unofficial version of the course exercises and tests.
12+
- 100 Exercises and tests are now available.
1313

1414
## [0.2.0] - 2024-08-31
1515

16-
### Added
16+
### Changed
1717

1818
- Updated all exercises and tests after solving them.
19+
20+
## [0.1.0] - 2024-08-28
21+
22+
### Added
23+
24+
- First unofficial version of the course exercises and tests.

chapters/chapter10_oop/exercises/exercise_69.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@
77
# - 20% tax for income greater than 50,000 and less than or equal to 100,000
88
# - 30% tax for income greater than 100,000
99

10-
# Example:
11-
# tax_calculator = TaxCalculator()
12-
# tax_calculator.calculate_tax(5000) => 0
13-
# tax_calculator.calculate_tax(15000) => 500
14-
# tax_calculator.calculate_tax(75000) => 10000
10+
# See `test_e69()` in `tests/test_ch10.py` for the expected behavior.
1511

1612

1713
class TaxCalculator:

chapters/chapter10_oop/exercises/exercise_70.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@
33
# Create two subclasses called `Square` and `Circle` that inherit from `Shape` and implement the `area` method.
44
# Modify the `Square` and `Circle` classes to accept whichever attributes are necessary to calculate the area.
55

6-
7-
# Example:
8-
# square = Square(5)
9-
# assert square.area() == 25
10-
# circle = Circle(5)
11-
# assert circle.area() == 78.54
6+
# See `test_e70()` in `tests/test_ch10.py` for the expected behavior.
127

138
from abc import ABC, abstractmethod # noqa: F401
149

chapters/chapter10_oop/exercises/exercise_72.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,7 @@
1111
# Note: Feel free to define any additional methods or attributes that
1212
# you think are necessary for the `BookShelf` class.
1313

14-
# Example:
15-
# author = Author("John", "Doe")
16-
# book1 = Book("The Book", author, 2021, Genre.Fiction)
17-
# shelf = BookShelf([book1])
18-
# book2 = Book("Another Book", author, 2022, Genre.Fiction)
19-
# shelf.add_book(book2)
20-
# assert shelf.get_books() == [book1, book2]
21-
# assert shelf.get_books_by_genre(Genre.Fiction) == [book1, book2]
22-
# shelf.remove_book(book1)
14+
# See `test_e72()` in `tests/test_ch10.py` for the expected behavior.
2315

2416
from .exercise_71 import Book, Genre # noqa: F401
2517

chapters/chapter10_oop/exercises/exercise_73.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,8 @@
1111
# Note: Feel free to define any additional methods or attributes that
1212
# you think are necessary for the `BookShelf` class.
1313

14+
# See `test_e73()` in `tests/test_ch10.py` for the expected behavior.
1415

15-
# Example:
16-
# author = Author("John", "Doe")
17-
# book1 = Book("The Book", author, 2021, Genre.Fiction)
18-
# shelf1 = BookShelf([book1])
19-
# book2 = Book("Another Book", author, 2022, Genre.Fiction)
20-
# shelf2 = BookShelf([book2])
21-
# library = Library()
22-
# library.add_shelf(shelf1)
23-
# library.add_shelf(shelf2)
24-
# assert library.get_books() == [book1, book2]
25-
# assert library.is_book_in_library(book1) is True
26-
# assert library.is_book_in_library(Book("Non Existing Book", author, 2021, Genre.Fiction)) is False
27-
# library.remove_shelf(shelf1)
28-
# assert library.get_books() == [book2]
2916
from .exercise_71 import Book, Genre # noqa: F401
3017
from .exercise_72 import BookShelf # noqa: F401
3118

chapters/chapter10_oop/exercises/exercise_74.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
# 4. cards (a list of `Card` instances)
2424
# 5. total_balance (a float)
2525

26+
# See `test_e74()` in `tests/test_ch10.py` for the expected behavior.
27+
2628
from __future__ import annotations
2729
from dataclasses import dataclass, field # noqa: F401
2830

chapters/chapter10_oop/exercises/exercise_75.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# 6. withdraw(self, account_number: int, amount: float, card_number: int, pin: int) -> None: withdraws money from an account.
1414
# 7. deposit(self, account_number: int, amount: float) -> None: deposits money into an account.
1515

16+
# See `test_e75()` in `tests/test_ch10.py` for the expected behavior.
17+
1618
from .exercise_74 import Account, Card, Customer
1719

1820

chapters/chapter10_oop/exercises/exercise_77.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# We have two types of Content Creators: Bloggers and Vloggers.
33
# Both of them should have a method called `create_content` that calls the appropriate method to create content.
44
# We want to define a protocol called `ContentCreator` that has the `create_content` method.
5+
# See `test_e77()` in `tests/test_ch10.py` for the expected behavior.
56

67
from typing import Protocol
78

chapters/chapter10_oop/exercises/exercise_78.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Exercise 78 - Simple University System
22
# Given the following class definitions.
33
# Implement the `Student` and `Professor` classes to inherit from the `Person` class.
4-
4+
# See `test_e78()` in `tests/test_ch10.py` for the expected behavior.
55
from __future__ import annotations
66

77

0 commit comments

Comments
 (0)