forked from MIT-Emerging-Talent/ET6-practice-code-review
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into finding_maximum_minimum
- Loading branch information
Showing
18 changed files
with
853 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,19 +4,19 @@ on: [push, pull_request, workflow_dispatch] | |
|
||
jobs: | ||
ls_linting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ls-lint/[email protected] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ls-lint/[email protected] | ||
|
||
md_formatting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: nosborn/[email protected] | ||
with: | ||
files: . | ||
config_file: .markdownlint.yml | ||
- uses: actions/checkout@v4 | ||
- uses: nosborn/[email protected] | ||
with: | ||
files: . | ||
config_file: .markdownlint.yml | ||
|
||
py_formatting: | ||
runs-on: ubuntu-latest | ||
|
@@ -44,7 +44,7 @@ jobs: | |
if: always() | ||
- name: install pylint | ||
run: | | ||
python - m pip install --upgrade pip | ||
python -m pip install --upgrade pip | ||
pip install pylint | ||
shell: bash | ||
- name: Python - Check Linting - pylint | ||
|
@@ -55,7 +55,6 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: python version | ||
run: python --version | ||
shell: bash | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<div align="center"> | ||
<img src="https://text.media.giphy.com/v1/media/giphy.gif?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJwcm9kLTIwMjAtMDQtMjIiLCJzdHlsZSI6InJhZ2UiLCJ0ZXh0IjoiR3JvdXAlMjAyNCIsImlhdCI6MTczNTIwMzkwMX0.6dBXa0DW7iOQGETxKrxHG39dDYceUY57aFiex_UZ6LM" alt="Demo GIF"> | ||
</div> | ||
<!-- MD03/no-inline-html: Inline HTML is used intentionally to center the image for better visual alignment. --> | ||
|
||
# This Project is All About Teamwork! 🤝 | ||
|
||
Together, we dive into coding and testing challenges, sharpening our problem-solving and collaboration skills as a united team. Our mission is to work in harmony, review each others solutions, and grow through shared learning and constructive feedback. We believe that exceptional solutions stem from exceptional teamwork. That's why we are dedicated to building and supporting each other every step of the way. Let's make amazing things happen, together! ⭐ | ||
|
||
--- | ||
|
||
## 🚀 Project Overview | ||
|
||
### What We will Do | ||
|
||
- 🧠 **Coding Challenges**: We will face a variety of coding problems, each offering new learning opportunities. | ||
- 🔍 **Review Each Others Solutions**: After completing tasks, we will give and receive feedback to ensure high-quality results and growth. | ||
- 🛠️ **Collaborate on Testing**: Testing is a key part of the process. We will work together to ensure our solutions are robust and reliable. | ||
- 💬 **Communicate Effectively**: From code discussions to problem-solving, clear and open communication is key to our success. | ||
- 🚧 **Solve Roadblocks Together**: No one is left behind. If a challenge arises, we will come together to brainstorm and troubleshoot. | ||
- 🌱 **Learn and Grow**: The goal is not just to finish the tasks, but to grow as a team through shared knowledge and experiences. | ||
|
||
--- | ||
|
||
## 🌟 How We Collaborate | ||
|
||
🧩 We take collaboration seriously. Here is how we do it: | ||
|
||
- [Our Norms](https://github.com/MIT-Emerging-Talent/ET6-foundations-group-24/blob/main/collaboration/README.md) | ||
- [Our Communication](https://github.com/MIT-Emerging-Talent/ET6-foundations-group-24/blob/main/collaboration/communication.md) | ||
- [Our Constraints](https://github.com/MIT-Emerging-Talent/ET6-foundations-group-24/blob/main/collaboration/constraints.md) | ||
- [Our Learning Goals](https://github.com/MIT-Emerging-Talent/ET6-foundations-group-24/blob/main/collaboration/learning_goals.md) | ||
- [Our Retrospectives](https://github.com/MIT-Emerging-Talent/ET6-foundations-group-24/blob/main/collaboration/retrospective.md) | ||
- [Our challenges](https://github.com/MIT-Emerging-Talent/ET6-foundations-group-24/tree/main/solutions) | ||
|
||
--- | ||
|
||
## Meet the Dream Team 🧑🤝🧑 | ||
|
||
Our squad is made up of some seriously talented people who bring the 🔥 to this project. Check out the crew making it all come to life: | ||
|
||
- [**Abel Mesfin Teka**](https://github.com/TekaMesfinAbel) | ||
- [**Banchiamlak Tessema**](https://github.com/BanchiHub) | ||
- [**Gai Samuel**](https://github.com/GaiSamuel) | ||
- [**Khusro Sakhi**](https://github.com/Khusro-S) | ||
- [**Linah Khayri**](https://github.com/linahKhayri) | ||
- [**Mohamed Elnageeb**](https://github.com/Mohamed-Elnageeb) | ||
- [**Robel Mengsteab**](https://github.com/robiel0143) | ||
- [**Viktoriya Haiduk**](https://github.com/ViktoriyaHaiduk) | ||
- [**Yonatan Yishkl Yifat**](https://github.com/YonatanBest) | ||
- [**Zeinab Mohammed**](https://github.com/Zeinab15) | ||
|
||
### 💥 Here We Go | ||
|
||
With the team all set, we are ready to make some magic happen. Stay with us for the ride, things are about to get awesome! 💪 | ||
|
||
![Demo GIF](https://media0.giphy.com/media/v1.Y2lkPTc5MGI3NjExOTBrZHhqdG9tNG9sNDd2c2YwdThvaW5qc3d2OHB1ZHJmajN4Z2hweCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/3o85xHhy12MVG2fkVW/giphy.webp) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,23 @@ | ||
# Solutions | ||
|
||
Welcome to the **Solutions** directory of Group 24! This folder contains the implementations and solutions to the challenges or problems assigned to the group by its members. | ||
|
||
## Directory Structure | ||
|
||
- Each task or problem will have its own folder or file, clearly named for easy identification. | ||
- Code solutions are typically written in python. | ||
|
||
## Contribution Guidelines | ||
|
||
1. Ensure your solution is optimized and well-documented. | ||
2. Follow the coding standards outlined by the team. | ||
3. Include comments in your code to explain key logic. | ||
4. Test your solutions locally before submitting them. | ||
|
||
## Status | ||
|
||
- We continuously improve and refine our solutions. Please check for updates regularly! | ||
|
||
## Contact | ||
|
||
For questions or suggestions regarding the solutions, reach out to the team members. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
""" | ||
This module provides a function to calculate the mean (average) of a list of numbers. | ||
Date created: Dec 30,2024 | ||
Author: @Abel Teka | ||
""" | ||
|
||
from typing import List, Optional | ||
|
||
|
||
def calculate_mean(numbers: List[float]) -> Optional[float]: | ||
""" | ||
Calculate the mean (average) of a list of numbers. | ||
Args: | ||
numbers (List[float]): A list of numbers (integers or floats). | ||
Returns: | ||
Optional[float]: The mean (average) of the numbers in the list. | ||
- Returns None if the list is empty. | ||
- Returns infinity if the sum of the list is infinite. | ||
Raises: | ||
TypeError: If `numbers` is not a list or contains non-numeric elements. | ||
Examples: | ||
>>> calculate_mean([1, 2, 3, 4, 5]) | ||
3.0 | ||
>>> calculate_mean([10, 20, 30]) | ||
20.0 | ||
>>> calculate_mean([]) | ||
>>> calculate_mean([float('inf'), 1, 2]) | ||
inf | ||
""" | ||
if not isinstance(numbers, list): | ||
raise TypeError("Input must be a list.") | ||
if any(not isinstance(n, (int, float)) for n in numbers): | ||
raise TypeError("All elements in the list must be numbers.") | ||
|
||
if not numbers: | ||
return None | ||
|
||
return sum(numbers) / len(numbers) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
""" | ||
This module provides a function to check if two strings are anagrams. | ||
Date created: Dec 31, 2024 | ||
Author: @Abel Teka | ||
""" | ||
|
||
|
||
def is_anagram(string1: str, string2: str) -> bool: | ||
""" | ||
Check if two strings are anagrams of each other. | ||
Args: | ||
string1 (str): The first string to compare. | ||
string2 (str): The second string to compare. | ||
Returns: | ||
bool: True if the strings are anagrams, False otherwise. | ||
Raises: | ||
AttributeError: If either argument is not a string. | ||
Examples: | ||
>>> is_anagram("listen", "silent") | ||
True | ||
>>> is_anagram("hello", "world") | ||
False | ||
>>> is_anagram("evil", "vile") | ||
True | ||
""" | ||
if not isinstance(string1, str) or not isinstance(string2, str): | ||
raise AttributeError("Both inputs must be strings.") | ||
|
||
# Normalize strings: remove spaces, convert to lowercase, and sort characters | ||
normalized1 = "".join(sorted(string1.replace(" ", "").lower())) | ||
normalized2 = "".join(sorted(string2.replace(" ", "").lower())) | ||
|
||
return normalized1 == normalized2 |
Oops, something went wrong.