From d9964036ceed8a6c1e27df97a3c6534d378c0b00 Mon Sep 17 00:00:00 2001 From: majdadel20 Date: Fri, 10 Jan 2025 14:08:03 +0200 Subject: [PATCH 01/39] Adding untracked files before switching branches --- solutions/multiplication.py | 32 +++++++++++++++++ solutions/tests/test_multiplication.py | 49 ++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 solutions/multiplication.py create mode 100644 solutions/tests/test_multiplication.py diff --git a/solutions/multiplication.py b/solutions/multiplication.py new file mode 100644 index 000000000..6a0e549ec --- /dev/null +++ b/solutions/multiplication.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python3 +# -- coding: utf-8 -- +""" +A module for multiplying two numbers. +Module contents: + - multiply_numbers: Multiplies two numbers and returns the product. +""" + + +def multiply_numbers(num1, num2): + """Returns the product of two numbers. + Takes two numbers (integers or floats) and returns their product. + The output type will match the input types (i.e., if both inputs are integers, + the output will be an integer; if both are floats, the output will be a float). + If the inputs are not both integers or floats, an AssertionError is raised. + Parameters: + num1: int or float, the first number to multiply + num2: int or float, the second number to multiply + Returns -> int or float: the product of num1 and num2 + Raises: + AssertionError: if inputs are not both int or float + Examples: + >>> multiply_numbers(5, 3) + 15 + >>> multiply_numbers(4.5, 2.0) + 9.0 + >>> multiply_numbers(-7, 6) + -42 + """ + assert isinstance(num1, (int, float)), "num1 must be an int or float" + assert isinstance(num2, (int, float)), "num2 must be an int or float" + return num1 * num2 diff --git a/solutions/tests/test_multiplication.py b/solutions/tests/test_multiplication.py new file mode 100644 index 000000000..9f88220f4 --- /dev/null +++ b/solutions/tests/test_multiplication.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Test module for multiply_numbers function. + +Test categories: + - Standard cases: typical numbers + - Edge cases: zero, negative numbers + - Defensive tests: wrong input types, assertions + +""" + +import unittest + +from solutions.multiplication import multiply_numbers + + +class TestMultiplyNumbers(unittest.TestCase): + """Test suite for the multiply_numbers function.""" + + # Standard test cases + def test_positive_integers(self): + """It should return the product of two positive integers""" + self.assertEqual(multiply_numbers(5, 3), 15) + + def test_floats(self): + """It should return the product of two floats""" + self.assertEqual(multiply_numbers(4.5, 2.0), 9.0) + + def test_mixed_signs(self): + """It should return the product of one negative integer and one positive integer""" + self.assertEqual(multiply_numbers(-7, 6), -42) + + # Edge cases + def test_zero(self): + """It should return the product when multiplying by zero""" + self.assertEqual(multiply_numbers(0, 12), 0) + + def test_negative_integers(self): + """It should return the product of two negative integers""" + self.assertEqual(multiply_numbers(-3, -4), 12) + + def test_float_and_integer(self): + """It should return the product of a float and an integer""" + self.assertEqual(multiply_numbers(2.5, 4), 10.0) + + +if __name__ == "main": # noqa: F821 + unittest.main() From 2cd048c3f5419d0e0b396ca4e087ac6c5e5c7611 Mon Sep 17 00:00:00 2001 From: ziadahanass Date: Fri, 10 Jan 2025 07:17:44 -0800 Subject: [PATCH 02/39] password --- solutions/tests/test_password_strength.py | 34 +++++++++++++++++------ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/solutions/tests/test_password_strength.py b/solutions/tests/test_password_strength.py index 14c84a14b..c80c38a84 100644 --- a/solutions/tests/test_password_strength.py +++ b/solutions/tests/test_password_strength.py @@ -27,24 +27,42 @@ def test_strong_password(self): self.assertEqual(password_strength("StrongP@ssw0rd"), "Strong password") def test_weak_password_no_uppercase(self): - """Test that a weak password with no uppercase letter returns 'Weak password'.""" - self.assertEqual(password_strength("weakpass1@"), "Weak password") + """Test that a weak password with no uppercase letter returns 'Missing uppercase letter'.""" + self.assertEqual(password_strength("weakpass1@"), "Missing uppercase letter") def test_weak_password_no_special_char(self): - """Test that a weak password with no special character returns 'Weak password'.""" - self.assertEqual(password_strength("NoSpecial123"), "Weak password") + """Test that a weak password with no special character returns 'Missing special character'.""" + self.assertEqual(password_strength("NoSpecial123"), "Missing special character") def test_weak_password_too_short(self): - """Test that a short password returns 'Weak password'.""" - self.assertEqual(password_strength("Short1!"), "Weak password") + """Test that a short password returns 'Password too short'.""" + self.assertEqual(password_strength("Short1!"), "Password too short") def test_strong_password_with_special_characters(self): """Test that a valid password with all requirements returns 'Strong password'.""" self.assertEqual(password_strength("GoodPassword1@"), "Strong password") def test_weak_password_missing_special_characters(self): - """Test that a password missing special characters returns 'Weak password'.""" - self.assertEqual(password_strength("NoSpecial123"), "Weak password") + """Test that a password missing special characters returns 'Missing special character'.""" + self.assertEqual(password_strength("NoSpecial123"), "Missing special character") + + def test_empty_password(self): + """Test that an empty password returns 'Password too short'.""" + self.assertEqual(password_strength(""), "Password too short") + + def test_password_with_only_digits(self): + """Test that a password with only digits returns 'Missing uppercase letter'.""" + self.assertEqual(password_strength("12345678"), "Missing uppercase letter") + + def test_password_with_only_special_characters(self): + """Test that a password with only special characters returns 'Missing uppercase letter'.""" + self.assertEqual(password_strength("!@#$%^&*"), "Missing uppercase letter") + + def test_invalid_input(self): + """Test that a non-string input raises an AssertionError.""" + with self.assertRaises(AssertionError) as context: + password_strength(12345) # Non-string input + self.assertEqual(str(context.exception), "Password must be a string") if __name__ == "__main__": From c21d95c0f4ef01352115968331d2ace6cf597d43 Mon Sep 17 00:00:00 2001 From: majdadel20 Date: Fri, 10 Jan 2025 20:04:01 +0200 Subject: [PATCH 03/39] Available time --- collaboration/communication.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collaboration/communication.md b/collaboration/communication.md index cccb50ba9..75885758f 100644 --- a/collaboration/communication.md +++ b/collaboration/communication.md @@ -29,7 +29,7 @@ How often we will get in touch on each channel, and what we will discuss there: | Clement| 6-8 PM | 6-8 PM | 6-8 PM | 6-8 PM | 6-8 PM | 6-8 PM | 6-8 PM | | Fahed | 6-8 PM | 7-9 PM | 6-8 PM | 5-7 PM | 8-9 PM | 8-9 PM | 6-8 PM | | Faisal | $TIME$ | $TIME$ | $TIME$ | $TIME$ | $TIME$ | $TIME$ | $TIME$ | -| Majd | $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$ | | Özgür | $TIME$ | $TIME$ | $TIME$ | $TIME$ | $TIME$ | $TIME$ | $TIME$ | @@ -41,7 +41,7 @@ How often we will get in touch on each channel, and what we will discuss there: - Clement: 1.5 hours - Fahed: 1 hour - Faisal: $HOURS$ -- Majd: $HOURS$ +- Majd: 4 hours - Mohamed: 2 hours - Obey: $HOURS$ - Özgür: $HOURS$ From 98aaa56746e80fa9d26cabf18ce14d5d9362cce7 Mon Sep 17 00:00:00 2001 From: ozgurozbekuk Date: Sat, 11 Jan 2025 00:20:04 +0200 Subject: [PATCH 04/39] update learning goals --- collaboration/learning_goals.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/collaboration/learning_goals.md b/collaboration/learning_goals.md index 01f29d7c5..df5c54395 100644 --- a/collaboration/learning_goals.md +++ b/collaboration/learning_goals.md @@ -86,5 +86,7 @@ environment that provides support and help to every member in need. - ### **Özgür** - - + -Learning team work. + -Write clean python code. + -Improve communication skills with team members. + -Using unit test. From deaed69329c61512ec09cfcde97636529580fce4 Mon Sep 17 00:00:00 2001 From: ozgurozbekuk Date: Sat, 11 Jan 2025 01:32:56 +0200 Subject: [PATCH 05/39] update goals --- collaboration/communication.md | 2 +- collaboration/learning_goals.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/collaboration/communication.md b/collaboration/communication.md index 8596d7c10..8a8f185fa 100644 --- a/collaboration/communication.md +++ b/collaboration/communication.md @@ -32,7 +32,7 @@ How often we will get in touch on each channel, and what we will discuss there: | Majd |6-8 PM | 6-8 PM | 5-6 PM | 4-7 PM | 4-7 PM | 4-7 PM | 7-9 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$ | -| Özgür | $TIME$ | $TIME$ | $TIME$ | $TIME$ | $TIME$ | $TIME$ | $TIME$ | +| Ö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 | ### How many hours everyone reserves for Code review per day diff --git a/collaboration/learning_goals.md b/collaboration/learning_goals.md index 9b8c6c440..ad4e7ba6f 100644 --- a/collaboration/learning_goals.md +++ b/collaboration/learning_goals.md @@ -86,7 +86,7 @@ environment that provides support and help to every member in need. - ### **Özgür** - -learning team work. - -Write clean python code. - -Improve communication skills with team members. - -Using unit test. + - learning team work. + - Write clean python code. + - Improve communication skills with team members. + - Using unit test. From c239f65cea9763219549be7b6548a213872bdfd1 Mon Sep 17 00:00:00 2001 From: majdadel20 Date: Sat, 11 Jan 2025 09:01:36 +0200 Subject: [PATCH 06/39] Swap Number --- solutions/swap_number.py | 43 ++++++++++++++++++ solutions/tests/test_swap_number.py | 68 +++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 solutions/swap_number.py create mode 100644 solutions/tests/test_swap_number.py diff --git a/solutions/swap_number.py b/solutions/swap_number.py new file mode 100644 index 000000000..d213e13e7 --- /dev/null +++ b/solutions/swap_number.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python3 +""" +Module to swap two numbers. + +Author: Majd Abualsoud +Date: 11st January 2025 +Group: ET6-foundations-group-16 +""" + + +def swap_numbers(a: float, b: float) -> tuple: + """ + Swaps the values of two numbers. + + Parameters: + a (float): The first number. + b (float): The second number. + + Returns: + tuple: A tuple containing the swapped values (b, a). + + Examples: + >>> swap_numbers(1, 2) + (2, 1) + >>> swap_numbers(10, 20) + (20, 10) + >>> swap_numbers(0, 5) + (5, 0) + >>> swap_numbers("10", 20) # doctest: +ELLIPSIS + Traceback (most recent call last): + ... + AssertionError: Both a and b must be numeric values (int or float) + """ + # Ensure that both a and b are numeric values (either int or float) + assert isinstance( + a, (int, float) + ), "Both a and b must be numeric values (int or float)" + assert isinstance( + b, (int, float) + ), "Both a and b must be numeric values (int or float)" + + # Swap the values and return as a tuple + return b, a diff --git a/solutions/tests/test_swap_number.py b/solutions/tests/test_swap_number.py new file mode 100644 index 000000000..b14d1ad97 --- /dev/null +++ b/solutions/tests/test_swap_number.py @@ -0,0 +1,68 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Test module for swap_numbers function + +Test categories: + - Standard cases: typical inputs + - Edge cases: extreme inputs and boundaries + - Defensive tests: wrong input types, assertions + +Created on 11/1/2025 +@author: Majd Abualsoud +Group: ET foundations group 16 +""" + +import unittest + +from ..swap_number import swap_numbers + + +class TestSwapNumbers(unittest.TestCase): + """Test suite for the swap_numbers function""" + + # Standard cases + def test_swap_two_positive_numbers(self): + """It should swap two positive numbers""" + self.assertEqual(swap_numbers(1, 2), (2, 1)) + + def test_swap_two_negative_numbers(self): + """It should swap two negative numbers""" + self.assertEqual(swap_numbers(-1, -2), (-2, -1)) + + def test_swap_a_positive_and_a_negative_number(self): + """It should swap a positive and a negative number""" + self.assertEqual(swap_numbers(1, -2), (-2, 1)) + + def test_swap_zero_and_a_number(self): + """It should swap zero with another number""" + self.assertEqual(swap_numbers(0, 5), (5, 0)) + + # Edge cases + def test_swap_large_numbers(self): + """It should swap large numbers correctly""" + self.assertEqual(swap_numbers(10**6, 10**9), (10**9, 10**6)) + + def test_swap_float_numbers(self): + """It should swap float numbers correctly""" + self.assertEqual(swap_numbers(1.5, 2.5), (2.5, 1.5)) + + # Defensive tests + def test_non_numeric_input_a(self): + """It should raise AssertionError if the first input is not numeric""" + with self.assertRaises(AssertionError): + swap_numbers("1", 2) + + def test_non_numeric_input_b(self): + """It should raise AssertionError if the second input is not numeric""" + with self.assertRaises(AssertionError): + swap_numbers(1, "2") + + def test_non_numeric_input_both(self): + """It should raise AssertionError if both inputs are not numeric""" + with self.assertRaises(AssertionError): + swap_numbers("1", "2") + + +if __name__ == "__main__": + unittest.main() From 364299b4a37dfc44a0762976300174eac8135099 Mon Sep 17 00:00:00 2001 From: ozgurozbekuk Date: Sat, 11 Jan 2025 12:00:56 +0200 Subject: [PATCH 07/39] update goals --- collaboration/learning_goals.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/collaboration/learning_goals.md b/collaboration/learning_goals.md index 9b8c6c440..ad4e7ba6f 100644 --- a/collaboration/learning_goals.md +++ b/collaboration/learning_goals.md @@ -86,7 +86,7 @@ environment that provides support and help to every member in need. - ### **Özgür** - -learning team work. - -Write clean python code. - -Improve communication skills with team members. - -Using unit test. + - learning team work. + - Write clean python code. + - Improve communication skills with team members. + - Using unit test. From f5acae3893ac4ee9eaf299ef9b753ed27f5c5429 Mon Sep 17 00:00:00 2001 From: ozgurozbekuk Date: Sat, 11 Jan 2025 12:07:23 +0200 Subject: [PATCH 08/39] update times --- collaboration/communication.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collaboration/communication.md b/collaboration/communication.md index 8a8f185fa..57dfb64cf 100644 --- a/collaboration/communication.md +++ b/collaboration/communication.md @@ -44,7 +44,7 @@ How often we will get in touch on each channel, and what we will discuss there: - Majd: $HOURS$ - Mohamed: 2 hours - Obey: $HOURS$ -- Özgür: $HOURS$ +- Özgür: 2 hours - Razan: An hour ## Asking for Help From 5606aff1d8e5e550a63101f1bd9390b38c21d07d Mon Sep 17 00:00:00 2001 From: Mo-Altayeb Date: Sat, 11 Jan 2025 13:35:00 +0200 Subject: [PATCH 09/39] solution of common_elements and uodated solutions README --- solutions/README.md | 3 + solutions/common_elements.py | 59 +++++++++ solutions/tests/test_common_elements.py | 152 ++++++++++++++++++++++++ 3 files changed, 214 insertions(+) create mode 100644 solutions/common_elements.py create mode 100644 solutions/tests/test_common_elements.py diff --git a/solutions/README.md b/solutions/README.md index 96d039647..12b625b31 100644 --- a/solutions/README.md +++ b/solutions/README.md @@ -31,6 +31,9 @@ while corresponding test files are maintained in the `tests` folder. | `feet_to_meters.py` | Converting feet to meters| Obay | | `volts_to_amperes.py` | Converting volts to amperes| Obay | | `greatest_number.py` | Finding greatest number in a list| Razan | +| `common_elements.py` | finding common elements in two lists | Mohamed| +| `simple_calculator.py` | performs simple operations on two integers | Mohamed| +| `reverse_string.py` | reverses contents of an input string | Mohamed| --- diff --git a/solutions/common_elements.py b/solutions/common_elements.py new file mode 100644 index 000000000..c9d06e445 --- /dev/null +++ b/solutions/common_elements.py @@ -0,0 +1,59 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +A module for finding the common elements between two input lists. + +Created on 11/1/2025 +@author: Mohamed Altayeb +Group: ET foundations group 16 (Matrix) + +Module functions: + - common_elements: finds the common elements between two lists. + +""" + + +def common_elements(list1: list, list2: list) -> list: + """ + Compares two input lists and returns a list that contains + all the common elements between the two input lists without repeating + the common elements if they are duplicated in the input lists: + + Arguments: + list1 (list): the first list we want to compare. + list2 (list): the second list we want to compare. + + Returns-> list: A list containing all common elements between two input lists, + the returned list will have the common elements of the first input list + followed by the common elements of the second input list. + + + Raises: + AssertionError: if inputs are not lists. + + >>> common_elements([1,2,3,4,5,6] , [4,5,6,7]) + [4, 5, 6] + + >>> common_elements(["c", "a", "r"] , ["c", "a", "t"]) + ['c', 'a'] + + >>> common_elements([[1,2] , [2,3,4], ["mohamed"]] , [["mohamed"], [1,2,3], [2,3,4], [4,5,6]]) + [[2, 3, 4], ['mohamed']] + """ + # Ensure both inputs are lists + if not isinstance(list1, list) or not isinstance(list2, list): + raise AssertionError("Both inputs must be lists") + + common_list_no_duplicates = [] + + # Iterate through elements of the first list + for element1 in list1: + # Iterate through elements of second list comparing + # each element in the second list to the element in the first list + for element2 in list2: + if element1 == element2 and element1 not in common_list_no_duplicates: + # Add the element to the resultant list + common_list_no_duplicates.append(element1) + + # Return the resultant list with common elements with no duplicated elements + return common_list_no_duplicates diff --git a/solutions/tests/test_common_elements.py b/solutions/tests/test_common_elements.py new file mode 100644 index 000000000..488ec1e97 --- /dev/null +++ b/solutions/tests/test_common_elements.py @@ -0,0 +1,152 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Test module for common_elements function + +Test categories: + -Standard cases: typical inputs + -Edge cases: extreme inputs and boundaries + -Defensive tests: wrong input types, assertions + +Created on 11/1/2025 +@author: Mohamed Altayeb +Group: ET foundations group 16 (Matrix) +""" + +import unittest + +from ..common_elements import common_elements + + +class TestCommonElements(unittest.TestCase): + """Test suite for the common_elements function""" + + # Standard cases + def test_lists_with_integers(self): + """it should return a list with the common integers between the two input lists""" + self.assertEqual(common_elements([1, 2, 3], [2, 3]), [2, 3]) + + def test_lists_with_string_elements(self): + """it should return a list with the common string elements between the two input lists""" + self.assertEqual(common_elements(["a", "b", "c"], ["b", "c"]), ["b", "c"]) + + def test_lists_with_duplicated_elements(self): + """it should return a list with the common elements between the two input lists + without duplicating the elements in the output list""" + self.assertEqual(common_elements(["a", "b", "b"], ["b", "b", "c"]), ["b"]) + + def test_lists_with_mixed_string_and_integer_elements(self): + """it should return a list with the common string elements between the two input lists""" + self.assertEqual( + common_elements(["a", "b", 2, 56, "abc"], ["abc", 56, 999]), [56, "abc"] + ) + + def test_lists_within_lists(self): + """it should return a list with the common elements between the two input lists + even if the elements are lists as well""" + self.assertEqual( + common_elements( + [[1, 2], [2, 3, 4], ["mohamed"]], + [["mohamed"], [1, 2, 3], [2, 3, 4], [4, 5, 6]], + ), + [[2, 3, 4], ["mohamed"]], + ) + + def test_order_of_elements_in_output_list(self): + """the function should prioritize the order of the elements in the first input list""" + self.assertEqual(common_elements([1, 2, 3], [3, 2, 1]), [1, 2, 3]) + + # Edge cases + def test_long_lists(self): + """it should return a list with the common elements between the two input lists + regardless of the length of the input lists""" + self.assertEqual( + common_elements( + [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + ], + [ + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + ], + ), + [9], + ) + + def test_one_of_the_lists_is_empty(self): + """it should return an empty list""" + self.assertEqual(common_elements(["Mohamed", "cat", "1,2,3"], []), []) + + def test_both_of_the_lists_are_empty(self): + """it should return an empty list""" + self.assertEqual(common_elements([], []), []) + + # Defensive tests + def test_input1_is_not_a_list(self): + """It should raise AssertionError if first input is not a list""" + with self.assertRaises(AssertionError): + common_elements("mohamed", [1, 2, 3, 4, 5, 6]) + + def test_input2_is_not_a_list(self): + """It should raise AssertionError if second input is not a list""" + with self.assertRaises(AssertionError): + common_elements([1, 2, 3, 4, 5, 6], "numbers") From 45226991876301642a31395fdff5b23a9365baad Mon Sep 17 00:00:00 2001 From: ozgurozbekuk Date: Sat, 11 Jan 2025 14:14:53 +0200 Subject: [PATCH 10/39] prime number func and test --- solutions/check_prime_number.py | 27 ++++++++ solutions/tests/test_check_prime_number.py | 77 ++++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 solutions/check_prime_number.py create mode 100644 solutions/tests/test_check_prime_number.py diff --git a/solutions/check_prime_number.py b/solutions/check_prime_number.py new file mode 100644 index 000000000..b5e0bcde8 --- /dev/null +++ b/solutions/check_prime_number.py @@ -0,0 +1,27 @@ +"""This function check number for prime or not. + + Author: Özgür ÖZBEK + Date: 11th January 2025 + Group: ET6-foundations-group-16 +""" + +def is_prime(number): + """ + Check if a number is prime. + + Parameters: + - number (int): The number to check. + + Returns: + - bool: True if the number is prime, False otherwise. + """ + if number <= 1: + return False # Numbers 1 and smaller are not prime + for i in range(2, number): + if number % i == 0: # If a divisor is found, it is not prime + return False + return True # If it has no divisors, it is a prime number + + +num = 14 # pylint: disable=invalid-name +print(f"Is {num} prime? {is_prime(num)}") diff --git a/solutions/tests/test_check_prime_number.py b/solutions/tests/test_check_prime_number.py new file mode 100644 index 000000000..f246d9862 --- /dev/null +++ b/solutions/tests/test_check_prime_number.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Unit Test for is_prime Function + +This script contains a unit test for the `is_prime` function, which checks whether a given number +is prime or not. +A prime number is a number greater than 1 that has no divisors other than 1 and itself. + +The test class `TestIsPrime` includes various test cases to verify that the function works correctly +for different types of inputs: +- Prime numbers +- Non-prime numbers +- Edge cases (such as 0, 1, and negative numbers) +- Larger prime numbers + +Test cases include: +- Testing prime numbers like 2, 3, 5, and 7. +- Testing non-prime numbers like 1, 4, 6, 8, 9, etc. +- Checking edge cases such as 0 and negative numbers. + +To run the tests, use the Python `unittest` framework. +The tests will provide feedback on the correctness +of the `is_prime` function. + + +""" + +import unittest + +def is_prime(number): + """ + Check if a number is prime. + + Parameters: + - number (int): The number to check. + + Returns: + - bool: True if the number is prime, False otherwise. + """ + if number <= 1: + return False # Numbers 1 and smaller are not prime + for i in range(2, number): + if number % i == 0: # If a divisor is found, it is not prime + return False + return True # If it has no divisors, it is a prime number + +class TestIsPrime(unittest.TestCase): + """Test case for the is_prime function.""" + + def test_prime(self): + """Test prime numbers.""" + self.assertTrue(is_prime(2)) + self.assertTrue(is_prime(3)) + self.assertTrue(is_prime(5)) + self.assertTrue(is_prime(7)) + self.assertTrue(is_prime(13)) + + def test_non_prime(self): + """Test non-prime numbers.""" + self.assertFalse(is_prime(1)) + self.assertFalse(is_prime(4)) + self.assertFalse(is_prime(6)) + self.assertFalse(is_prime(8)) + self.assertFalse(is_prime(9)) + self.assertFalse(is_prime(10)) + self.assertFalse(is_prime(14)) + + def test_edge_case(self): + """Test edge cases.""" + self.assertFalse(is_prime(0)) + self.assertFalse(is_prime(-1)) + self.assertTrue(is_prime(97)) + +if __name__ == '__main__': + unittest.main() From d95ea31e4b88c57d1b1a3561b07b9d374cd51da6 Mon Sep 17 00:00:00 2001 From: ozgurozbekuk Date: Sat, 11 Jan 2025 14:40:53 +0200 Subject: [PATCH 11/39] ruff format --- solutions/check_prime_number.py | 13 +++++++------ solutions/tests/test_check_prime_number.py | 13 ++++++++----- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/solutions/check_prime_number.py b/solutions/check_prime_number.py index b5e0bcde8..9c7a8ee0c 100644 --- a/solutions/check_prime_number.py +++ b/solutions/check_prime_number.py @@ -1,17 +1,18 @@ """This function check number for prime or not. - Author: Özgür ÖZBEK - Date: 11th January 2025 - Group: ET6-foundations-group-16 +Author: Özgür ÖZBEK +Date: 11th January 2025 +Group: ET6-foundations-group-16 """ + def is_prime(number): """ Check if a number is prime. - + Parameters: - number (int): The number to check. - + Returns: - bool: True if the number is prime, False otherwise. """ @@ -23,5 +24,5 @@ def is_prime(number): return True # If it has no divisors, it is a prime number -num = 14 # pylint: disable=invalid-name +num = 14 # pylint: disable=invalid-name print(f"Is {num} prime? {is_prime(num)}") diff --git a/solutions/tests/test_check_prime_number.py b/solutions/tests/test_check_prime_number.py index f246d9862..0a6e1eba1 100644 --- a/solutions/tests/test_check_prime_number.py +++ b/solutions/tests/test_check_prime_number.py @@ -5,7 +5,7 @@ Unit Test for is_prime Function This script contains a unit test for the `is_prime` function, which checks whether a given number -is prime or not. +is prime or not. A prime number is a number greater than 1 that has no divisors other than 1 and itself. The test class `TestIsPrime` includes various test cases to verify that the function works correctly @@ -20,7 +20,7 @@ - Testing non-prime numbers like 1, 4, 6, 8, 9, etc. - Checking edge cases such as 0 and negative numbers. -To run the tests, use the Python `unittest` framework. +To run the tests, use the Python `unittest` framework. The tests will provide feedback on the correctness of the `is_prime` function. @@ -29,13 +29,14 @@ import unittest + def is_prime(number): """ Check if a number is prime. - + Parameters: - number (int): The number to check. - + Returns: - bool: True if the number is prime, False otherwise. """ @@ -46,6 +47,7 @@ def is_prime(number): return False return True # If it has no divisors, it is a prime number + class TestIsPrime(unittest.TestCase): """Test case for the is_prime function.""" @@ -73,5 +75,6 @@ def test_edge_case(self): self.assertFalse(is_prime(-1)) self.assertTrue(is_prime(97)) -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() From 0f9b62af3c6ee8f794eb7f038bd801c9bd53e313 Mon Sep 17 00:00:00 2001 From: ozgurozbekuk Date: Sat, 11 Jan 2025 14:53:28 +0200 Subject: [PATCH 12/39] add name and date --- solutions/tests/test_check_prime_number.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/solutions/tests/test_check_prime_number.py b/solutions/tests/test_check_prime_number.py index 0a6e1eba1..073ef79d0 100644 --- a/solutions/tests/test_check_prime_number.py +++ b/solutions/tests/test_check_prime_number.py @@ -24,6 +24,9 @@ The tests will provide feedback on the correctness of the `is_prime` function. +Author: Özgür ÖZBEK +Date: 11th January 2025 +Group: ET6-foundations-group-16 """ From dc33e09def8816020673b3fd42b3ca52924c2b03 Mon Sep 17 00:00:00 2001 From: ozgurozbekuk Date: Sat, 11 Jan 2025 17:47:16 +0200 Subject: [PATCH 13/39] resolve conversaation --- solutions/check_prime_number.py | 46 ++++++--- solutions/tests/test_check_prime_number.py | 106 ++++++++++++--------- 2 files changed, 93 insertions(+), 59 deletions(-) diff --git a/solutions/check_prime_number.py b/solutions/check_prime_number.py index 9c7a8ee0c..3818d2dd9 100644 --- a/solutions/check_prime_number.py +++ b/solutions/check_prime_number.py @@ -1,28 +1,44 @@ -"""This function check number for prime or not. +#!/usr/bin/env python3 +""" +This function check number for prime or not. Author: Özgür ÖZBEK Date: 11th January 2025 Group: ET6-foundations-group-16 """ +def check_prime_number(number: int) -> bool: + """Checks if a number is prime. -def is_prime(number): - """ - Check if a number is prime. + A prime number is a number greater than 1 that has no divisors other than 1 and itself. + This function checks if the given number is prime by testing divisibility for all numbers + from 2 to the square root of the number. Parameters: - - number (int): The number to check. + number: int, the number to check for prime. Must be greater than 1. Returns: - - bool: True if the number is prime, False otherwise. - """ - if number <= 1: - return False # Numbers 1 and smaller are not prime - for i in range(2, number): - if number % i == 0: # If a divisor is found, it is not prime - return False - return True # If it has no divisors, it is a prime number + bool: True if the number is prime, False otherwise. + Raises: + AssertionError: If the number is less than or equal to 1. -num = 14 # pylint: disable=invalid-name -print(f"Is {num} prime? {is_prime(num)}") + Examples: + >>> check_prime_number(2) + True + >>> check_prime_number(3) + True + >>> check_prime_number(4) + False + >>> check_prime_number(13) + True + >>> check_prime_number(1) # doctest: +ELLIPSIS + Traceback (most recent call last): + ... + AssertionError: Number must be greater than 1 + """ + assert number > 1, "Number must be greater than 1" + for i in range(2, int(number**0.5) + 1): + if number % i == 0: + return False + return True diff --git a/solutions/tests/test_check_prime_number.py b/solutions/tests/test_check_prime_number.py index 073ef79d0..bf4e90526 100644 --- a/solutions/tests/test_check_prime_number.py +++ b/solutions/tests/test_check_prime_number.py @@ -2,9 +2,10 @@ # -*- coding: utf-8 -*- """ -Unit Test for is_prime Function +Unit Test for check_prime_number Function -This script contains a unit test for the `is_prime` function, which checks whether a given number +This script contains a unit test for the `check_prime_number` function, +which checks whether a given number is prime or not. A prime number is a number greater than 1 that has no divisors other than 1 and itself. @@ -16,13 +17,13 @@ - Larger prime numbers Test cases include: -- Testing prime numbers like 2, 3, 5, and 7. -- Testing non-prime numbers like 1, 4, 6, 8, 9, etc. +- Testing prime numbers like 2, 3, 5, 7, 13. +- Testing non-prime numbers like 1, 4, 6, 8, 9, 10, 14. - Checking edge cases such as 0 and negative numbers. To run the tests, use the Python `unittest` framework. The tests will provide feedback on the correctness -of the `is_prime` function. +of the `check_prime_number` function. Author: Özgür ÖZBEK Date: 11th January 2025 @@ -31,53 +32,70 @@ """ import unittest +from solutions.check_prime_number import check_prime_number +class TestCheckPrimeNumber(unittest.TestCase): + """Test case for the check_prime_number function.""" -def is_prime(number): - """ - Check if a number is prime. + def test_prime(self): + """Test prime number 2.""" + self.assertTrue(check_prime_number(2)) - Parameters: - - number (int): The number to check. + def test_prime_3(self): + """Test prime number 3.""" + self.assertTrue(check_prime_number(3)) - Returns: - - bool: True if the number is prime, False otherwise. - """ - if number <= 1: - return False # Numbers 1 and smaller are not prime - for i in range(2, number): - if number % i == 0: # If a divisor is found, it is not prime - return False - return True # If it has no divisors, it is a prime number + def test_prime_5(self): + """Test prime number 5.""" + self.assertTrue(check_prime_number(5)) + def test_prime_7(self): + """Test prime number 7.""" + self.assertTrue(check_prime_number(7)) -class TestIsPrime(unittest.TestCase): - """Test case for the is_prime function.""" + def test_prime_13(self): + """Test prime number 13.""" + self.assertTrue(check_prime_number(13)) - def test_prime(self): - """Test prime numbers.""" - self.assertTrue(is_prime(2)) - self.assertTrue(is_prime(3)) - self.assertTrue(is_prime(5)) - self.assertTrue(is_prime(7)) - self.assertTrue(is_prime(13)) - - def test_non_prime(self): - """Test non-prime numbers.""" - self.assertFalse(is_prime(1)) - self.assertFalse(is_prime(4)) - self.assertFalse(is_prime(6)) - self.assertFalse(is_prime(8)) - self.assertFalse(is_prime(9)) - self.assertFalse(is_prime(10)) - self.assertFalse(is_prime(14)) - - def test_edge_case(self): - """Test edge cases.""" - self.assertFalse(is_prime(0)) - self.assertFalse(is_prime(-1)) - self.assertTrue(is_prime(97)) + def test_non_prime_1(self): + """Test non-prime number 1.""" + self.assertFalse(check_prime_number(1)) + + def test_non_prime_4(self): + """Test non-prime number 4.""" + self.assertFalse(check_prime_number(4)) + + def test_non_prime_6(self): + """Test non-prime number 6.""" + self.assertFalse(check_prime_number(6)) + + def test_non_prime_8(self): + """Test non-prime number 8.""" + self.assertFalse(check_prime_number(8)) + + def test_non_prime_9(self): + """Test non-prime number 9.""" + self.assertFalse(check_prime_number(9)) + + def test_non_prime_10(self): + """Test non-prime number 10.""" + self.assertFalse(check_prime_number(10)) + + def test_non_prime_14(self): + """Test non-prime number 14.""" + self.assertFalse(check_prime_number(14)) + + def test_edge_case_0(self): + """Test edge case 0.""" + self.assertFalse(check_prime_number(0)) + + def test_edge_case_negative(self): + """Test edge case negative number.""" + self.assertFalse(check_prime_number(-1)) + def test_edge_case_large_prime(self): + """Test edge case with large prime.""" + self.assertTrue(check_prime_number(97)) if __name__ == "__main__": unittest.main() From 39cf798cf872bb451b0f2c50b778f203b6e78ef1 Mon Sep 17 00:00:00 2001 From: ozgurozbekuk Date: Sat, 11 Jan 2025 17:54:54 +0200 Subject: [PATCH 14/39] resolved --- solutions/tests/test_check_prime_number.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions/tests/test_check_prime_number.py b/solutions/tests/test_check_prime_number.py index bf4e90526..b2bb630cd 100644 --- a/solutions/tests/test_check_prime_number.py +++ b/solutions/tests/test_check_prime_number.py @@ -32,7 +32,7 @@ """ import unittest -from solutions.check_prime_number import check_prime_number +from ..check_prime_number import check_prime_number class TestCheckPrimeNumber(unittest.TestCase): """Test case for the check_prime_number function.""" From 4da13e17162a3b1104feb551862e841f5094c483 Mon Sep 17 00:00:00 2001 From: ozgurozbekuk Date: Sat, 11 Jan 2025 18:10:30 +0200 Subject: [PATCH 15/39] try resolve assrtion --- solutions/check_prime_number.py | 1 + solutions/tests/test_check_prime_number.py | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/solutions/check_prime_number.py b/solutions/check_prime_number.py index 3818d2dd9..59e7ba521 100644 --- a/solutions/check_prime_number.py +++ b/solutions/check_prime_number.py @@ -7,6 +7,7 @@ Group: ET6-foundations-group-16 """ + def check_prime_number(number: int) -> bool: """Checks if a number is prime. diff --git a/solutions/tests/test_check_prime_number.py b/solutions/tests/test_check_prime_number.py index b2bb630cd..b815b0882 100644 --- a/solutions/tests/test_check_prime_number.py +++ b/solutions/tests/test_check_prime_number.py @@ -34,6 +34,7 @@ import unittest from ..check_prime_number import check_prime_number + class TestCheckPrimeNumber(unittest.TestCase): """Test case for the check_prime_number function.""" @@ -87,15 +88,18 @@ def test_non_prime_14(self): def test_edge_case_0(self): """Test edge case 0.""" - self.assertFalse(check_prime_number(0)) + with self.assertRaises(AssertionError): + check_prime_number(0) def test_edge_case_negative(self): """Test edge case negative number.""" - self.assertFalse(check_prime_number(-1)) + with self.assertRaises(AssertionError): + check_prime_number(-1) def test_edge_case_large_prime(self): """Test edge case with large prime.""" self.assertTrue(check_prime_number(97)) + if __name__ == "__main__": unittest.main() From 262dad76f9db7b65bf7c7a2d2c6c996f7bea9197 Mon Sep 17 00:00:00 2001 From: majdadel20 Date: Sat, 11 Jan 2025 18:11:26 +0200 Subject: [PATCH 16/39] Hexcadecimal to decimal --- solutions/hexacdecimal_to_decimal.py | 33 ++++++++++++++ .../tests/test_hexcadecimal_to_decimal.py | 43 +++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 solutions/hexacdecimal_to_decimal.py create mode 100644 solutions/tests/test_hexcadecimal_to_decimal.py diff --git a/solutions/hexacdecimal_to_decimal.py b/solutions/hexacdecimal_to_decimal.py new file mode 100644 index 000000000..403a162a5 --- /dev/null +++ b/solutions/hexacdecimal_to_decimal.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python3 +""" +Module to convert hexadecimal to decimal. + +Author: Majd Abualsoud +""" + + +def hex_to_decimal(hex_value: str) -> int: + """ + Converts a hexadecimal value to a decimal. + + Parameters: + hex_value (str): The hexadecimal value to convert. + + Returns: + int: The decimal equivalent of the hexadecimal value. + + Examples: + >>> hex_to_decimal("1A") + 26 + >>> hex_to_decimal("FF") + 255 + >>> hex_to_decimal("0") + 0 + """ + # Ensure the hex_value is a valid hexadecimal string + assert isinstance(hex_value, str), "Input must be a string" + assert all( + c in "0123456789ABCDEFabcdef" for c in hex_value + ), "Invalid hexadecimal character" + # Convert hexadecimal to decimal + return int(hex_value, 16) diff --git a/solutions/tests/test_hexcadecimal_to_decimal.py b/solutions/tests/test_hexcadecimal_to_decimal.py new file mode 100644 index 000000000..a423155e5 --- /dev/null +++ b/solutions/tests/test_hexcadecimal_to_decimal.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python3 +""" +Test module for hex_to_decimal function. + +Test categories: + - Standard cases: typical hexadecimal inputs + - Defensive tests: invalid input types +Author: Majd ABUALSOUD +""" + +import unittest +from hexacdecimal_to_decimal import hex_to_decimal + + +"""Test suite for the hex_to_decimal function.""" + + +# Standard test cases +def test_standard_hex(self): + self.assertEqual(hex_to_decimal("1A"), 26) + + +def test_uppercase_hex(self): + self.assertEqual(hex_to_decimal("FF"), 255) + + +def test_zero(self): + self.assertEqual(hex_to_decimal("0"), 0) + + +# Defensive tests +def test_non_string_input(self): + with self.assertRaises(AssertionError): + hex_to_decimal(123) + + +def test_invalid_hex_input(self): + with self.assertRaises(AssertionError): + hex_to_decimal("G1") + + +if __name__ == "__main__": + unittest.main() From 536990367b28d1fc012af994d56ec16888cbcb5d Mon Sep 17 00:00:00 2001 From: ozgurozbekuk Date: Sat, 11 Jan 2025 18:13:40 +0200 Subject: [PATCH 17/39] try resolve assrtions for 1 --- solutions/tests/test_check_prime_number.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/solutions/tests/test_check_prime_number.py b/solutions/tests/test_check_prime_number.py index b815b0882..c75d27579 100644 --- a/solutions/tests/test_check_prime_number.py +++ b/solutions/tests/test_check_prime_number.py @@ -58,10 +58,6 @@ def test_prime_13(self): """Test prime number 13.""" self.assertTrue(check_prime_number(13)) - def test_non_prime_1(self): - """Test non-prime number 1.""" - self.assertFalse(check_prime_number(1)) - def test_non_prime_4(self): """Test non-prime number 4.""" self.assertFalse(check_prime_number(4)) @@ -95,6 +91,11 @@ def test_edge_case_negative(self): """Test edge case negative number.""" with self.assertRaises(AssertionError): check_prime_number(-1) + + def test_non_prime_1(self): + """Test non-prime number 1.""" + with self.assertRaises(AssertionError): + check_prime_number(1) def test_edge_case_large_prime(self): """Test edge case with large prime.""" From a5855232704f3fffb08199d1e55058268109e88d Mon Sep 17 00:00:00 2001 From: ozgurozbekuk Date: Sat, 11 Jan 2025 18:15:29 +0200 Subject: [PATCH 18/39] formatting --- solutions/tests/test_check_prime_number.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions/tests/test_check_prime_number.py b/solutions/tests/test_check_prime_number.py index c75d27579..82caf8859 100644 --- a/solutions/tests/test_check_prime_number.py +++ b/solutions/tests/test_check_prime_number.py @@ -91,7 +91,7 @@ def test_edge_case_negative(self): """Test edge case negative number.""" with self.assertRaises(AssertionError): check_prime_number(-1) - + def test_non_prime_1(self): """Test non-prime number 1.""" with self.assertRaises(AssertionError): From e24946c0a0aab05bf4f032623c51a657ddc3893d Mon Sep 17 00:00:00 2001 From: majdadel20 Date: Sat, 11 Jan 2025 18:32:22 +0200 Subject: [PATCH 19/39] Area of Circle --- solutions/.vscode/launch.json | 14 ++++++++++++ solutions/area_circle.py | 32 ++++++++++++++++++++++++++ solutions/tests/test_area_circle.py | 35 +++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 solutions/.vscode/launch.json create mode 100644 solutions/area_circle.py create mode 100644 solutions/tests/test_area_circle.py diff --git a/solutions/.vscode/launch.json b/solutions/.vscode/launch.json new file mode 100644 index 000000000..a75c1414f --- /dev/null +++ b/solutions/.vscode/launch.json @@ -0,0 +1,14 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Python Debugger: Python File", + "type": "debugpy", + "request": "launch", + "program": "${file}" + } + ] +} \ No newline at end of file diff --git a/solutions/area_circle.py b/solutions/area_circle.py new file mode 100644 index 000000000..d667a0912 --- /dev/null +++ b/solutions/area_circle.py @@ -0,0 +1,32 @@ +""" +This module provides a function to calculate the area of a circle given its radius. +""" + +import math + + +def area_of_circle(radius: float) -> float: + """ + Calculate the area of a circle given its radius. + + Args: + radius (float): The radius of the circle. Must be a non-negative number. + + Returns: + float: The area of the circle. + + Raises: + ValueError: If the radius is negative. + + Examples: + >>> area_of_circle(1) + 3.141592653589793 + >>> area_of_circle(0) + 0.0 + >>> area_of_circle(2.5) + 19.634954084936208 + """ + if radius < 0: + raise ValueError("The radius must be a non-negative number.") + + return math.pi * radius * radius diff --git a/solutions/tests/test_area_circle.py b/solutions/tests/test_area_circle.py new file mode 100644 index 000000000..a80aa5d89 --- /dev/null +++ b/solutions/tests/test_area_circle.py @@ -0,0 +1,35 @@ +""" +Test suite for the area_of_circle function. +""" + +import math +import unittest +from area_circle import area_of_circle + + +class TestAreaOfCircle(unittest.TestCase): + """ + Unit tests for the area_of_circle function. + """ + + def test_positive_radius(self): + """Test area calculation with a positive radius.""" + self.assertAlmostEqual(area_of_circle(1), 3.141592653589793) + self.assertAlmostEqual(area_of_circle(2.5), 19.634954084936208) + + def test_zero_radius(self): + """Test area calculation with a radius of zero.""" + self.assertAlmostEqual(area_of_circle(0), 0.0) + + def test_negative_radius(self): + """Test area calculation with a negative radius.""" + with self.assertRaises(ValueError): + area_of_circle(-1) + + def test_large_radius(self): + """Test area calculation with a large radius.""" + self.assertAlmostEqual(area_of_circle(1e6), math.pi * 1e6 * 1e6) + + +if __name__ == "main": + unittest.main() From 865e61ff4487dbd95ec43f3d8f91cddf10325c1c Mon Sep 17 00:00:00 2001 From: ozgurozbekuk Date: Sat, 11 Jan 2025 18:33:47 +0200 Subject: [PATCH 20/39] solution readme update --- solutions/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/solutions/README.md b/solutions/README.md index 7a630d3c1..07f198a61 100644 --- a/solutions/README.md +++ b/solutions/README.md @@ -32,6 +32,7 @@ while corresponding test files are maintained in the `tests` folder. | `volts_to_amperes.py` | Converting volts to amperes| Obay | | `miles_to_kilometers.py` | Converting miles to kilometers| Obay | | `greatest_number.py` | Finding greatest number in a list| Razan | +| `check_prime_number.py` | Given a positive int if it is a prime number| Özgür | --- From 42a5dc8b82c8e15ee98e0f8299ccd8198251c5f7 Mon Sep 17 00:00:00 2001 From: majdadel20 Date: Sat, 11 Jan 2025 18:39:53 +0200 Subject: [PATCH 21/39] Area --- solutions/.vscode/launch.json | 14 ------ solutions/hexacdecimal_to_decimal.py | 33 -------------- solutions/swap_number.py | 43 ------------------ solutions/tests/test_area_circle.py | 2 +- solutions/tests/test_swap_number.py | 68 ---------------------------- 5 files changed, 1 insertion(+), 159 deletions(-) delete mode 100644 solutions/.vscode/launch.json delete mode 100644 solutions/hexacdecimal_to_decimal.py delete mode 100644 solutions/swap_number.py delete mode 100644 solutions/tests/test_swap_number.py diff --git a/solutions/.vscode/launch.json b/solutions/.vscode/launch.json deleted file mode 100644 index a75c1414f..000000000 --- a/solutions/.vscode/launch.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Python Debugger: Python File", - "type": "debugpy", - "request": "launch", - "program": "${file}" - } - ] -} \ No newline at end of file diff --git a/solutions/hexacdecimal_to_decimal.py b/solutions/hexacdecimal_to_decimal.py deleted file mode 100644 index 403a162a5..000000000 --- a/solutions/hexacdecimal_to_decimal.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python3 -""" -Module to convert hexadecimal to decimal. - -Author: Majd Abualsoud -""" - - -def hex_to_decimal(hex_value: str) -> int: - """ - Converts a hexadecimal value to a decimal. - - Parameters: - hex_value (str): The hexadecimal value to convert. - - Returns: - int: The decimal equivalent of the hexadecimal value. - - Examples: - >>> hex_to_decimal("1A") - 26 - >>> hex_to_decimal("FF") - 255 - >>> hex_to_decimal("0") - 0 - """ - # Ensure the hex_value is a valid hexadecimal string - assert isinstance(hex_value, str), "Input must be a string" - assert all( - c in "0123456789ABCDEFabcdef" for c in hex_value - ), "Invalid hexadecimal character" - # Convert hexadecimal to decimal - return int(hex_value, 16) diff --git a/solutions/swap_number.py b/solutions/swap_number.py deleted file mode 100644 index d213e13e7..000000000 --- a/solutions/swap_number.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python3 -""" -Module to swap two numbers. - -Author: Majd Abualsoud -Date: 11st January 2025 -Group: ET6-foundations-group-16 -""" - - -def swap_numbers(a: float, b: float) -> tuple: - """ - Swaps the values of two numbers. - - Parameters: - a (float): The first number. - b (float): The second number. - - Returns: - tuple: A tuple containing the swapped values (b, a). - - Examples: - >>> swap_numbers(1, 2) - (2, 1) - >>> swap_numbers(10, 20) - (20, 10) - >>> swap_numbers(0, 5) - (5, 0) - >>> swap_numbers("10", 20) # doctest: +ELLIPSIS - Traceback (most recent call last): - ... - AssertionError: Both a and b must be numeric values (int or float) - """ - # Ensure that both a and b are numeric values (either int or float) - assert isinstance( - a, (int, float) - ), "Both a and b must be numeric values (int or float)" - assert isinstance( - b, (int, float) - ), "Both a and b must be numeric values (int or float)" - - # Swap the values and return as a tuple - return b, a diff --git a/solutions/tests/test_area_circle.py b/solutions/tests/test_area_circle.py index a80aa5d89..d3618f854 100644 --- a/solutions/tests/test_area_circle.py +++ b/solutions/tests/test_area_circle.py @@ -4,7 +4,7 @@ import math import unittest -from area_circle import area_of_circle +from ..area_circle import area_of_circle class TestAreaOfCircle(unittest.TestCase): diff --git a/solutions/tests/test_swap_number.py b/solutions/tests/test_swap_number.py deleted file mode 100644 index b14d1ad97..000000000 --- a/solutions/tests/test_swap_number.py +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -""" -Test module for swap_numbers function - -Test categories: - - Standard cases: typical inputs - - Edge cases: extreme inputs and boundaries - - Defensive tests: wrong input types, assertions - -Created on 11/1/2025 -@author: Majd Abualsoud -Group: ET foundations group 16 -""" - -import unittest - -from ..swap_number import swap_numbers - - -class TestSwapNumbers(unittest.TestCase): - """Test suite for the swap_numbers function""" - - # Standard cases - def test_swap_two_positive_numbers(self): - """It should swap two positive numbers""" - self.assertEqual(swap_numbers(1, 2), (2, 1)) - - def test_swap_two_negative_numbers(self): - """It should swap two negative numbers""" - self.assertEqual(swap_numbers(-1, -2), (-2, -1)) - - def test_swap_a_positive_and_a_negative_number(self): - """It should swap a positive and a negative number""" - self.assertEqual(swap_numbers(1, -2), (-2, 1)) - - def test_swap_zero_and_a_number(self): - """It should swap zero with another number""" - self.assertEqual(swap_numbers(0, 5), (5, 0)) - - # Edge cases - def test_swap_large_numbers(self): - """It should swap large numbers correctly""" - self.assertEqual(swap_numbers(10**6, 10**9), (10**9, 10**6)) - - def test_swap_float_numbers(self): - """It should swap float numbers correctly""" - self.assertEqual(swap_numbers(1.5, 2.5), (2.5, 1.5)) - - # Defensive tests - def test_non_numeric_input_a(self): - """It should raise AssertionError if the first input is not numeric""" - with self.assertRaises(AssertionError): - swap_numbers("1", 2) - - def test_non_numeric_input_b(self): - """It should raise AssertionError if the second input is not numeric""" - with self.assertRaises(AssertionError): - swap_numbers(1, "2") - - def test_non_numeric_input_both(self): - """It should raise AssertionError if both inputs are not numeric""" - with self.assertRaises(AssertionError): - swap_numbers("1", "2") - - -if __name__ == "__main__": - unittest.main() From 4ea7831d86edaa4e20d7b4daede2ae5bfcfee2cc Mon Sep 17 00:00:00 2001 From: majdadel20 Date: Sat, 11 Jan 2025 18:41:53 +0200 Subject: [PATCH 22/39] Area of Circle --- .../tests/test_hexcadecimal_to_decimal.py | 43 ------------------- 1 file changed, 43 deletions(-) delete mode 100644 solutions/tests/test_hexcadecimal_to_decimal.py diff --git a/solutions/tests/test_hexcadecimal_to_decimal.py b/solutions/tests/test_hexcadecimal_to_decimal.py deleted file mode 100644 index a423155e5..000000000 --- a/solutions/tests/test_hexcadecimal_to_decimal.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python3 -""" -Test module for hex_to_decimal function. - -Test categories: - - Standard cases: typical hexadecimal inputs - - Defensive tests: invalid input types -Author: Majd ABUALSOUD -""" - -import unittest -from hexacdecimal_to_decimal import hex_to_decimal - - -"""Test suite for the hex_to_decimal function.""" - - -# Standard test cases -def test_standard_hex(self): - self.assertEqual(hex_to_decimal("1A"), 26) - - -def test_uppercase_hex(self): - self.assertEqual(hex_to_decimal("FF"), 255) - - -def test_zero(self): - self.assertEqual(hex_to_decimal("0"), 0) - - -# Defensive tests -def test_non_string_input(self): - with self.assertRaises(AssertionError): - hex_to_decimal(123) - - -def test_invalid_hex_input(self): - with self.assertRaises(AssertionError): - hex_to_decimal("G1") - - -if __name__ == "__main__": - unittest.main() From 6512d2b3b88a90bd46f4a2fdb497b662f860f8b0 Mon Sep 17 00:00:00 2001 From: majdadel20 Date: Sat, 11 Jan 2025 18:52:26 +0200 Subject: [PATCH 23/39] Readme solution updates --- solutions/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/solutions/README.md b/solutions/README.md index 8452aeeb4..d3e31bc76 100644 --- a/solutions/README.md +++ b/solutions/README.md @@ -28,6 +28,9 @@ while corresponding test files are maintained in the `tests` folder. | `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| +| `square.py`| Find the number power of two | Majd | --- From f8246c10a0de07e13b895ee22ebdc8514826c05a Mon Sep 17 00:00:00 2001 From: Bikaze Date: Sat, 11 Jan 2025 18:52:41 +0200 Subject: [PATCH 24/39] Started working on the notes README --- notes/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/notes/README.md b/notes/README.md index 17e0f0ded..1bbbd8f60 100644 --- a/notes/README.md +++ b/notes/README.md @@ -1 +1,3 @@ # Notes + +Welcome to the **Notes** directory! 🎉 From 1282f6e42d0af7f36cdca8dfaf110f28ba8ab401 Mon Sep 17 00:00:00 2001 From: Bikaze Date: Sat, 11 Jan 2025 18:54:01 +0200 Subject: [PATCH 25/39] Add some content to the notes README --- notes/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/notes/README.md b/notes/README.md index 1bbbd8f60..2b389ca85 100644 --- a/notes/README.md +++ b/notes/README.md @@ -1,3 +1,6 @@ # Notes Welcome to the **Notes** directory! 🎉 + +This is our little corner of the project where we share all the gems we pick up +along the way. From d2b2775c76f9f70f936467d48d58add41ce3ecea Mon Sep 17 00:00:00 2001 From: Bikaze Date: Sat, 11 Jan 2025 18:54:21 +0200 Subject: [PATCH 26/39] Add some emojis to the notes README --- notes/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes/README.md b/notes/README.md index 2b389ca85..f6a5ab5f1 100644 --- a/notes/README.md +++ b/notes/README.md @@ -3,4 +3,4 @@ Welcome to the **Notes** directory! 🎉 This is our little corner of the project where we share all the gems we pick up -along the way. +along the way. 🧠✨ From 64179e9b807d5c0bde52ab62df014233ce1c8c74 Mon Sep 17 00:00:00 2001 From: Bikaze Date: Sat, 11 Jan 2025 18:55:27 +0200 Subject: [PATCH 27/39] Add note types to the notes README --- notes/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/notes/README.md b/notes/README.md index f6a5ab5f1..9488bb21d 100644 --- a/notes/README.md +++ b/notes/README.md @@ -4,3 +4,8 @@ Welcome to the **Notes** directory! 🎉 This is our little corner of the project where we share all the gems we pick up along the way. 🧠✨ + +Here’s what you’ll find (and what you’re welcome to add): + +- 🖋️ **What We're Learning:** Got a cool trick in Git? Learned a new design pattern? Found a clever way to squash bugs? Share it here! +- 😂 **Funny Moments:** Code reviews aren’t always serious — if something made you laugh (or cry), jot it down! Laughter is the best debugging tool. From 5b7b2faf77d3b56ba9add2fd8354fffc63ba9ddd Mon Sep 17 00:00:00 2001 From: Bikaze Date: Sat, 11 Jan 2025 18:56:10 +0200 Subject: [PATCH 28/39] Add more note types to the notes README --- notes/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/notes/README.md b/notes/README.md index 9488bb21d..07c265c09 100644 --- a/notes/README.md +++ b/notes/README.md @@ -9,3 +9,7 @@ Here’s what you’ll find (and what you’re welcome to add): - 🖋️ **What We're Learning:** Got a cool trick in Git? Learned a new design pattern? Found a clever way to squash bugs? Share it here! - 😂 **Funny Moments:** Code reviews aren’t always serious — if something made you laugh (or cry), jot it down! Laughter is the best debugging tool. +- 📚 **Resources:** Found a great article, video, or book that helped you level up? Share it with the team! +- ❤️ **Personal Reflections:** How’s the journey been for you? Whether it’s growth, challenges, or proud moments, we’d love to hear about it. +- 🤝 **Collaboration Stories:** Cool ways we’ve helped each other shine or overcame hurdles as a team. +- 🎨 **Creative Additions:** Doodles, memes, or anything that adds color to our shared experience! From 9648db5f88c0ee61fb89bb4ef9e0114b661303e3 Mon Sep 17 00:00:00 2001 From: Bikaze Date: Sat, 11 Jan 2025 18:57:31 +0200 Subject: [PATCH 29/39] Resolve markdown lint issues from the notes README --- notes/README.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/notes/README.md b/notes/README.md index 07c265c09..66d8e5e07 100644 --- a/notes/README.md +++ b/notes/README.md @@ -7,9 +7,15 @@ along the way. 🧠✨ Here’s what you’ll find (and what you’re welcome to add): -- 🖋️ **What We're Learning:** Got a cool trick in Git? Learned a new design pattern? Found a clever way to squash bugs? Share it here! -- 😂 **Funny Moments:** Code reviews aren’t always serious — if something made you laugh (or cry), jot it down! Laughter is the best debugging tool. -- 📚 **Resources:** Found a great article, video, or book that helped you level up? Share it with the team! -- ❤️ **Personal Reflections:** How’s the journey been for you? Whether it’s growth, challenges, or proud moments, we’d love to hear about it. -- 🤝 **Collaboration Stories:** Cool ways we’ve helped each other shine or overcame hurdles as a team. -- 🎨 **Creative Additions:** Doodles, memes, or anything that adds color to our shared experience! +- 🖋️ **What We're Learning:** Got a cool trick in Git? Learned a new design +pattern? Found a clever way to squash bugs? Share it here! +- 😂 **Funny Moments:** Code reviews aren’t always serious — if something made +you laugh (or cry), jot it down! Laughter is the best debugging tool. +- 📚 **Resources:** Found a great article, video, or book that helped you level +up? Share it with the team! +- ❤️ **Personal Reflections:** How’s the journey been for you? Whether it’s +growth, challenges, or proud moments, we’d love to hear about it. +- 🤝 **Collaboration Stories:** Cool ways we’ve helped each other shine or +overcame hurdles as a team. +- 🎨 **Creative Additions:** Doodles, memes, or anything that adds color to our +shared experience! From 10328b469518f3796601d722f35b631317dac215 Mon Sep 17 00:00:00 2001 From: Bikaze Date: Sat, 11 Jan 2025 18:58:38 +0200 Subject: [PATCH 30/39] Add a sort of conclusion to the notes README --- notes/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/notes/README.md b/notes/README.md index 66d8e5e07..4cb8baf86 100644 --- a/notes/README.md +++ b/notes/README.md @@ -19,3 +19,5 @@ growth, challenges, or proud moments, we’d love to hear about it. overcame hurdles as a team. - 🎨 **Creative Additions:** Doodles, memes, or anything that adds color to our shared experience! + +This space is all about **connection** and **growth**. Use it freely to document your learning, share your quirks, or just have fun. Let’s make this a treasure trove of memories and insights! From a90c2ddca5a8091f78f6d3d61bb4422cb6ac306c Mon Sep 17 00:00:00 2001 From: Bikaze Date: Sat, 11 Jan 2025 18:59:00 +0200 Subject: [PATCH 31/39] Add an emoji to the notes README --- notes/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes/README.md b/notes/README.md index 4cb8baf86..8591dce91 100644 --- a/notes/README.md +++ b/notes/README.md @@ -20,4 +20,4 @@ overcame hurdles as a team. - 🎨 **Creative Additions:** Doodles, memes, or anything that adds color to our shared experience! -This space is all about **connection** and **growth**. Use it freely to document your learning, share your quirks, or just have fun. Let’s make this a treasure trove of memories and insights! +This space is all about **connection** and **growth**. Use it freely to document your learning, share your quirks, or just have fun. Let’s make this a treasure trove of memories and insights! 🚀 From ef45f49d0cb3bbff65536106acac1d5f760c6b59 Mon Sep 17 00:00:00 2001 From: Bikaze Date: Sat, 11 Jan 2025 18:59:28 +0200 Subject: [PATCH 32/39] Resolve markdown lint issues from the notes README --- notes/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/notes/README.md b/notes/README.md index 8591dce91..1900f17dd 100644 --- a/notes/README.md +++ b/notes/README.md @@ -20,4 +20,6 @@ overcame hurdles as a team. - 🎨 **Creative Additions:** Doodles, memes, or anything that adds color to our shared experience! -This space is all about **connection** and **growth**. Use it freely to document your learning, share your quirks, or just have fun. Let’s make this a treasure trove of memories and insights! 🚀 +This space is all about **connection** and **growth**. Use it freely to document +your learning, share your quirks, or just have fun. Let’s make this a treasure +trove of memories and insights! 🚀 From 8dd146f5a3c4f363b0cc9ca4284f061a71a79139 Mon Sep 17 00:00:00 2001 From: Bikaze Date: Sat, 11 Jan 2025 19:00:45 +0200 Subject: [PATCH 33/39] Last touches to the notes README --- notes/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/notes/README.md b/notes/README.md index 1900f17dd..558db9254 100644 --- a/notes/README.md +++ b/notes/README.md @@ -23,3 +23,5 @@ shared experience! This space is all about **connection** and **growth**. Use it freely to document your learning, share your quirks, or just have fun. Let’s make this a treasure trove of memories and insights! 🚀 + +Happy noting, team! 📝🌟 From c1a81787b65c175364bca8f0a044093e721a1c3e Mon Sep 17 00:00:00 2001 From: majdadel20 Date: Sat, 11 Jan 2025 19:41:33 +0200 Subject: [PATCH 34/39] Multiplication and Area after review --- solutions/area_circle.py | 3 +++ solutions/multiplication.py | 3 +++ solutions/tests/test_area_circle.py | 3 +++ solutions/tests/test_multiplication.py | 3 +++ 4 files changed, 12 insertions(+) diff --git a/solutions/area_circle.py b/solutions/area_circle.py index d667a0912..f748bb479 100644 --- a/solutions/area_circle.py +++ b/solutions/area_circle.py @@ -1,4 +1,7 @@ """ +Group: ET6-foundations-group-16 +Author:Majd Abualsoud +Date: January 11, 2025 This module provides a function to calculate the area of a circle given its radius. """ diff --git a/solutions/multiplication.py b/solutions/multiplication.py index 6a0e549ec..2a854efe1 100644 --- a/solutions/multiplication.py +++ b/solutions/multiplication.py @@ -1,6 +1,9 @@ #!/usr/bin/env python3 # -- coding: utf-8 -- """ +Group: ET6-foundations-group-16 +Author:Majd Abualsoud +Date: January 11, 2025 A module for multiplying two numbers. Module contents: - multiply_numbers: Multiplies two numbers and returns the product. diff --git a/solutions/tests/test_area_circle.py b/solutions/tests/test_area_circle.py index d3618f854..d00bdc10d 100644 --- a/solutions/tests/test_area_circle.py +++ b/solutions/tests/test_area_circle.py @@ -1,4 +1,7 @@ """ +Group: ET6-foundations-group-16 +Author:Majd Abualsoud +Date: January 11, 2025 Test suite for the area_of_circle function. """ diff --git a/solutions/tests/test_multiplication.py b/solutions/tests/test_multiplication.py index 9f88220f4..167024014 100644 --- a/solutions/tests/test_multiplication.py +++ b/solutions/tests/test_multiplication.py @@ -1,6 +1,9 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ +Group: ET6-foundations-group-16 +Author:Majd Abualsoud +Date: January 11, 2025 Test module for multiply_numbers function. Test categories: From de4ad43d42f8bf0efef7bc8e47d53cf214ee869a Mon Sep 17 00:00:00 2001 From: majdadel20 Date: Sat, 11 Jan 2025 19:52:56 +0200 Subject: [PATCH 35/39] Solve merging issue --- solutions/tests/test_area_circle.py | 1 + 1 file changed, 1 insertion(+) diff --git a/solutions/tests/test_area_circle.py b/solutions/tests/test_area_circle.py index d00bdc10d..196613adc 100644 --- a/solutions/tests/test_area_circle.py +++ b/solutions/tests/test_area_circle.py @@ -7,6 +7,7 @@ import math import unittest + from ..area_circle import area_of_circle From d2bddfa99a5edb71796dafd9ff57fd19c005110d Mon Sep 17 00:00:00 2001 From: RandomProjects-db Date: Sat, 11 Jan 2025 20:17:57 +0200 Subject: [PATCH 36/39] fix CI in test file --- solutions/tests/test_multiplication.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solutions/tests/test_multiplication.py b/solutions/tests/test_multiplication.py index e616982fd..aad193074 100644 --- a/solutions/tests/test_multiplication.py +++ b/solutions/tests/test_multiplication.py @@ -15,7 +15,7 @@ import unittest -from solutions.multiplication import multiply_numbers +from ..multiplication import multiply_numbers class TestMultiplyNumbers(unittest.TestCase): @@ -48,6 +48,6 @@ def test_float_and_integer(self): self.assertEqual(multiply_numbers(2.5, 4), 10.0) -if __name__ == "main": # noqa: F821 +if __name__ == "main": unittest.main() From 3d751a771041976dae42a6f2c0dcf9344a4f0dec Mon Sep 17 00:00:00 2001 From: RandomProjects-db Date: Sat, 11 Jan 2025 20:30:41 +0200 Subject: [PATCH 37/39] fix CI in test file --- solutions/tests/test_multiplication.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/solutions/tests/test_multiplication.py b/solutions/tests/test_multiplication.py index aad193074..387118055 100644 --- a/solutions/tests/test_multiplication.py +++ b/solutions/tests/test_multiplication.py @@ -1,20 +1,19 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ -Group: ET6-foundations-group-16 -Author:Majd Abualsoud + +Author: Majd Abualsoud Date: January 11, 2025 +Group: ET6-foundations-group-16 Test module for multiply_numbers function. Test categories: - Standard cases: typical numbers - Edge cases: zero, negative numbers - Defensive tests: wrong input types, assertions - """ import unittest - from ..multiplication import multiply_numbers @@ -23,31 +22,30 @@ class TestMultiplyNumbers(unittest.TestCase): # Standard test cases def test_positive_integers(self): - """It should return the product of two positive integers""" + """It should return the product of two positive integers.""" self.assertEqual(multiply_numbers(5, 3), 15) def test_floats(self): - """It should return the product of two floats""" + """It should return the product of two floats.""" self.assertEqual(multiply_numbers(4.5, 2.0), 9.0) def test_mixed_signs(self): - """It should return the product of one negative integer and one positive integer""" + """It should return the product of one negative integer and one positive integer.""" self.assertEqual(multiply_numbers(-7, 6), -42) # Edge cases def test_zero(self): - """It should return the product when multiplying by zero""" + """It should return the product when multiplying by zero.""" self.assertEqual(multiply_numbers(0, 12), 0) def test_negative_integers(self): - """It should return the product of two negative integers""" + """It should return the product of two negative integers.""" self.assertEqual(multiply_numbers(-3, -4), 12) def test_float_and_integer(self): - """It should return the product of a float and an integer""" + """It should return the product of a float and an integer.""" self.assertEqual(multiply_numbers(2.5, 4), 10.0) -if __name__ == "main": - +if __name__ == "__main__": unittest.main() From 5b413b8bd37daecd71a45ad9cf3336511ab827bb Mon Sep 17 00:00:00 2001 From: RandomProjects-db Date: Sat, 11 Jan 2025 21:25:54 +0200 Subject: [PATCH 38/39] fix CI in communication.md --- collaboration/communication.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collaboration/communication.md b/collaboration/communication.md index f6dfae01a..b666d9698 100644 --- a/collaboration/communication.md +++ b/collaboration/communication.md @@ -33,7 +33,7 @@ How often we will get in touch on each channel, and what we will discuss there: | 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$ | | Ö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 From 6e65b5c21983edebdf34cc8c11c385ae226b4c63 Mon Sep 17 00:00:00 2001 From: ziadahanass Date: Sat, 11 Jan 2025 11:57:42 -0800 Subject: [PATCH 39/39] add_new_changes_tosolution_readme --- solutions/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/solutions/README.md b/solutions/README.md index 453510597..42696557a 100644 --- a/solutions/README.md +++ b/solutions/README.md @@ -36,6 +36,8 @@ while corresponding test files are maintained in the `tests` folder. | `miles_to_kilometers.py` | Converting miles to kilometers| Obay | | `greatest_number.py` | Finding greatest number in a list| Razan | | `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 | ---