Skip to content

Commit

Permalink
Merge branch 'main' into fix_solutions_codes
Browse files Browse the repository at this point in the history
  • Loading branch information
ObayCipher authored Jan 12, 2025
2 parents d1ef4f8 + 4968c13 commit b08c656
Show file tree
Hide file tree
Showing 12 changed files with 715 additions and 16 deletions.
6 changes: 3 additions & 3 deletions collaboration/communication.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ How often we will get in touch on each channel, and what we will discuss there:
| Faisal | $TIME$ | $TIME$ | $TIME$ | $TIME$ | $TIME$ | $TIME$ | $TIME$ |
| Majd | 6-8 PM | 5-6 PM | 7-9 PM | 5-7 PM |7-9 PM | 6-8 PM | 6-8 PM |
| Mohamed| 6-9 PM | 6-9 PM | 6-9 PM | 6-10 PM | 2-9 PM | 6-9 PM | 6-9 PM |
| Obey | $TIME$ | $TIME$ | $TIME$ | $TIME$ | $TIME$ | $TIME$ | $TIME$ |
| Obey | 6-9 PM | 6-9 PM | 6-8 PM | 7-9 PM | 2-10 PM| 5-10 PM | 6-9 PM |
| Özgür | 5-7 PM | 5-7 PM | 5-7 PM | 5-7 PM | 5-7 PM | 5-7 PM | 5-7 PM |
| Razan | 7-9 PM | 9-10 PM | 7-9 PM | 7-9 PM | 7-9 PM | 7-9 PM | 7-9 PM |
| Razan | 7-9 PM | 9-10 PM | 7-9 PM | 7-9 PM | 7-9 PM | 7-9 PM | 7-9 PM |

### How many hours everyone reserves for Code review per day

Expand All @@ -43,7 +43,7 @@ How often we will get in touch on each channel, and what we will discuss there:
- Faisal: $HOURS$
- Majd: 4 hours
- Mohamed: 2 hours
- Obey: $HOURS$
- Obey: 2 hours
- Özgür: 2 hours
- Razan: An hour

Expand Down
6 changes: 5 additions & 1 deletion collaboration/learning_goals.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@ environment that provides support and help to every member in need.

- ### **Obey**

- Fully understand python basics from Evan's guides.
- Write clear code that is easy to be understood even if it is complex.
- Master advanced coding skills and best practices.
- Collaborate effectively in diverse teams.
- Enhance problem-solving and critical thinking abilities.
- Gain hands-on experience with industry tools and technologies.
- Build a strong professional network with mentors and peers.

- ### **Razan Ibrahim**

Expand Down
155 changes: 144 additions & 11 deletions collaboration/retrospective.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,156 @@
<!-- this template is for inspiration, feel free to change it however you like! -->

# Retrospective
# Project Retrospective: The Matrix 🕶️

## Stop Doing
## Project Highlights 🌟

## Continue Doing
### 1. What Went Well during the project? ✅

## Start Doing
- **Collaboration Successes** 🤝

## Lessons Learned
The team worked cohesively, leveraging each other’s strengths to accomplish
project goals.Effective communication and collaboration ensured
tasks were completed efficiently.

______________________________________________________________________
- **Supportive Environment** 💪
A strong sense of mutual support within the team helped overcome
challenges and maintain momentum throughout the project.

## Strategy vs. Board
- **Tools and Workflows** 🛠️

### What parts of your plan went as expected?
- Despite initial learning curves, the team successfully mastered the use of
the project board to organize and manage tasks efficiently by the end of the
project.
- The team collaborated effectively on GitHub, utilizing pull requests (PRs)
for thorough code reviews and ensuring high code quality.

### What parts of your plan did not work out?
- **Regular Updates** 🔄

### Did you need to add things that weren't in your strategy?
Regular stand-ups and progress updates kept everyone aligned,
ensuring clarity on priorities and reducing misunderstandings.

### Or remove extra steps?
### 2. Achievements 🏆

**Over 300 commits were achieved in under two weeks**, showcasing the team’s
efficiency and dedication. Furthermore, **the team mastered GitHub workflows**,
such as pull requests and code reviews, while **enhancing collaboration and**
**teamwork skills** through the effective use of communication and task management
tools.

---

## Stop Doing 🚫

- Resolving merge conflicts independently without collaborating to
ensure all changes are integrated smoothly.
- Submitting code without thorough testing, which led to integration issues.
- Writing overly technical descriptions in issue tickets, making it difficult
for non-programmers to understand.
- Spending too much time solving problems independently
instead of seeking help when needed.

---

## Continue Doing ✅

- Maintaining mutual support and collaboration.
- Documenting progress to ensure transparency and alignment within the team.
- Regularly using GitHub to track progress and organize tasks,
leveraging branches and pull requests for better organization.
- Using majority rule through polls to resolve differences of opinion.

---

## Start Doing 🚀

- Utilize GitHub’s discussion feature more effectively in future projects.
- Systematically record key learnings in the notes document.
- Keep track of changes that impact the entire group.
- Delete obsolete branches promptly after pull request reviews.
- Establish higher standards for pull requests, testing, and communication.

---

## Challenges Encountered ⚠️

### Key Pain Points 🔑

- Communication and coordination difficulties.
- Technical issues, such as pull request problems and CI check failures.
- Challenges in maintaining consistency across the codebase.

### Specific Examples 📌

- Availability challenges: Team members were not always
available simultaneously, causing occasional delays.
- Misalignment in task requirements and expectations, leading to inefficiencies.
- Early misuse of the project board hindered task organization.
- Frustrations with resolving merge conflicts and CI failures.
- Instances of working on the wrong project or branch, resulting in delays and corrections.
- Some team members encountered communication barriers, including challenges in
conveying desired code changes effectively due to language differences.
- Connectivity issues limited access to essential online resources.

---

## Lessons Learned 🎓💡

### Insights Gained 🔍

- Developed a deeper understanding of effective code review practices.
- Enhanced proficiency in GitHub workflows and tools.
- Recognized the importance of constructive feedback and clear communication
for collaboration success.

### Specific Learnings 📚

- Improved communication skills, enabling clearer expression of ideas and insights.
- Learned to request code changes effectively and provide precise,
constructive feedback during reviews.
- Gained expertise in managing merge conflicts proactively with proper workflows.
- Emphasized the importance of regular check-ins to keep the team aligned.
- Discovered the value of teamwork, flexibility, and adaptability in overcoming challenges.

---

## Strategy and Board 📋

### What parts of your plan went as expected? ✔️

- Successfully completed the expected number of challenges.
- Effectively utilized collaboration and communication tools to share resources
and coordinate tasks efficiently.
- Used GitHub and VS Code as expected, leveraging their features like cloning
repositories, creating pull requests, labeling issues, and tracking tasks.
- Fostered a supportive team environment where members were willing to assist
and support one another.

### What parts of your plan did not work out? ❌

- Merge conflicts were not managed effectively, resulting in delays.
- Communication gaps and language barriers led to duplicated efforts and
inconsistencies during code integration.
- Inefficient use of the project board workflow during early stages hindered organization.
- Time management expectations were not fully met, with the initial voluntary
deadline being missed.
- Resolving errors and CI check failures took more time than anticipated.

---

## Actionable Items for Future Projects 📈🎯

- Develop a standardized process for pull requests and code reviews.
- Implement regular check-ins or progress-tracking meetings, ensuring
unresolved challenges are documented for follow-up.
- Foster proactive communication and hold more frequent meetings to ensure
alignment and address challenges.
- Establish detailed plans with clearly defined milestones, schedules, and
deadlines for each project phase.

---

## Collective Reflection 🤝✨

The team collaborated effectively despite facing challenges, achieving
significant progress. Moving forward, improved planning, enhanced communication
and efficient task management will ensure smoother execution and even greater success.
7 changes: 6 additions & 1 deletion solutions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ while corresponding test files are maintained in the `tests` folder.
| `calculate_average.py`| Calculates the average of a list of numbers | Clement |
| `spiral_traverse.py` | Traverses a 2D matrix in spiral order | Fahed |
| `euler_totient.py` | Computes Euler's totient function (ϕ(n))| Fahed |
| `is_prime.py` | determine whether a given number is prime. | Fahed|
| `gcd.py` | A function to calculate the greatest common divisor (GCD)| Fahed|
| `kronecker_product.py` | Computes the Kronecker ⊗ product of 2 matrices | Fahed|
| `fibonacci.py` | Generates Fibonacci sequences up to n terms | Fahed |
| `direction_to_degree.py` | Convert a cardinal direction to degree | Obay |
| `check_odd_or_even.py` | Checks if a number is odd or even | Clement |
| `grading_system.py`| Assigning letter grade to a numeric score. | Razan |
| `kronecker_product.py` | Computes the Kronecker ⊗ product of 2 matrices | Fahed|
| `feet_to_meters.py` | Converting feet to meters| Obay |
| `area_circle.py`| Calculates the area of the circle | Majd |
| `multiplication.py`| Calculate the multiple of two numbers | Majd|
Expand All @@ -41,6 +44,8 @@ while corresponding test files are maintained in the `tests` folder.
| `check_prime_number.py` | Given a positive int if it is a prime number| Özgür |
| `password_strength.py` | Checks the strength of a password| Anas |
| `decimal_to_binary.py` | Converts decimal to its equivalent binary| Anas |
| `is_positive.py` | Determines if a given number is positive | Faisal |
| `is_palindrome.py` | Checks string palindrome properties | Faisal |

---

Expand Down
58 changes: 58 additions & 0 deletions solutions/fibonacci.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

"""
A module for generating Fibonacci sequences.
Module contents:
- generate_fibonacci: Generates Fibonacci sequence up to n terms.
The Fibonacci sequence is a series of numbers where each number is the sum of the two
preceding ones, starting with 0 and 1.
Author: Fahed Daibes
Created: 12-Jan-2025
"""


def generate_fibonacci(n: int) -> list:
"""
Generates the first n terms of the Fibonacci sequence.
Parameters:
- n (int): The number of terms to generate.
Returns:
- list: A list containing the first n terms of the Fibonacci sequence.
Raises:
- AssertionError: If the input is not a positive integer.
Examples:
>>> generate_fibonacci(0)
[]
>>> generate_fibonacci(1)
[0]
>>> generate_fibonacci(5)
[0, 1, 1, 2, 3]
>>> generate_fibonacci("five")
Traceback (most recent call last):
...
AssertionError: Input must be a non-negative integer.
"""
# Defensive check
assert isinstance(n, int) and n >= 0, "Input must be a non-negative integer."

if n == 0:
return []
if n == 1:
return [0]

sequence = [0, 1]
for _ in range(2, n):
sequence.append(sequence[-1] + sequence[-2])

return sequence
54 changes: 54 additions & 0 deletions solutions/gcd.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# !/usr/bin/env python3
# -*- coding: utf-8 -*-

"""
gcd.py
This module provides a function to calculate the greatest common divisor (GCD)
of two integers using the Euclidean algorithm.
Author: Fahed Daibes
Date: Jan 12 2025
Group: ET6-foundations-group-16
"""


def gcd(a: int, b: int) -> int:
"""
Calculates the greatest common divisor (GCD) of two integers.
Parameters:
- a (int): The first integer.
- b (int): The second integer.
Returns:
- int: The GCD of the two numbers.
Raises:
- AssertionError: If either input is not an integer.
Examples:
>>> gcd(48, 18)
6
>>> gcd(101, 103)
1
>>> gcd(0, 25)
25
>>> gcd(0, 0)
0
>>> gcd("eight", 16)
Traceback (most recent call last):
...
AssertionError: Both inputs must be integers.
"""
# Defensive check
assert isinstance(a, int) and isinstance(b, int), "Both inputs must be integers."

while b != 0:
a, b = b, a % b

return abs(a)
44 changes: 44 additions & 0 deletions solutions/is_positive.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env python3

"""
A module for checking if a number is positive.
Module contents:
- is_positive: Determines if a given number is positive.
Author: [Your name]
Created: 2025-01-08
"""


def is_positive(n: float) -> bool:
"""Determines if a given number is positive.
A number is considered positive if it is greater than 0.
Raises:
TypeError: If the input is not a real number (int or float).
Parameters:
n: float or int, the number to check.
Returns:
bool: True if the number is greater than 0, False otherwise.
Examples:
>>> is_positive(5)
True
>>> is_positive(-3)
False
>>> is_positive(0)
False
>>> is_positive(3.14)
True
>>> is_positive(-2.5)
False
"""
if isinstance(n, bool):
raise TypeError("Input must be a real number (int or float)")
if not isinstance(n, (int, float)):
raise TypeError("Input must be a real number (int or float)")
return n > 0
Loading

0 comments on commit b08c656

Please sign in to comment.