This project contains several Python functions that perform basic mathematical and list operations.
It also includes unit tests to verify that each function works correctly.
Mini_Assessment1/ โ โโโ main.py # Contains all function definitions โโโ test_main.py # Contains unittests for the functions โโโ README.md # Project documentation
| Function | Description |
|---|---|
| product(num1, num2) | Returns the product of two numbers |
| square(number) | Returns the square of a number |
| even(n) | Checks if a number is even |
| sum_of_list(numbers) | Calculates the sum of a list of numbers |
| list_of_even_numbers(numbers) | Returns a list of even numbers from the given list |
-
Fork the repo
-
Clone the repo git clone https://github.com/TumeloNtsilo/Mini_Assessment1.git cd Mini_Assessment1
-
Run the main file python3 main.py
-
Run all tests python3 -m unittest test_assessment2.py