Skip to content

Commit

Permalink
Revert deleted file
Browse files Browse the repository at this point in the history
  • Loading branch information
Kareiman committed Jan 12, 2025
2 parents 5622243 + 0a3823d commit 8b9c505
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 26 deletions.
37 changes: 14 additions & 23 deletions solutions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,23 @@ This folder contains implementations for the challenges.

1. **Merge Dictionaries**:
- A utility to merge two dictionaries with conflict resolution.
- Resolves conflicts with a custom function, or by default, `dict2` overwrites `dict1`.
- See `merge_dictionaries.py` for the implementation.

2. **Anagram Finder**:
- A function to check if two strings are anagrams.
- See `anagram_finder.py` for the implementation.
### How to Run

## Usage
1. Clone the repository.
2. Install dependencies (if any).
3. Run the tests:

To use any solution, simply import the
required function and pass the appropriate arguments.
```bash
python -m unittest solutions/tests/test_merge_dictionaries.py
```

### How to Run
### Example

1. Clone the repository.
2. Navigate to the folder containing the solution.
3. Run the desired script:

```bash
python <script_name>.py
```

### Example

```python
# Example for Anagram Finder
from anagram_finder import are_anagrams
result = are_anagrams("listen", "silent")
print(result) # Output: True
```python
dict1 = {"a": 1, "b": 2}
dict2 = {"b": 3, "c": 4}
merged = merge_dictionaries(dict1, dict2)
print(merged) # Output: {'a': 1, 'b': 3, 'c': 4}
6 changes: 3 additions & 3 deletions solutions/calculate_square_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ def calculate_square_area(side_length: float) -> float:
"""The function asks the user to enter the side length of the square
and the function returns the area of the square.
parameter:
Parameter:
side_length in integer or float
raises:
Raises:
AssertionError: if side_length was =< 0
ValueError: if the value entered was or str or text
returns:
Returns:
side_length ** 2
>>> calculate_square_area(5)
Expand Down

0 comments on commit 8b9c505

Please sign in to comment.