├── README.md ├── math_func03.py ├── math_func01.py ├── math_func02.py ├── math_func05.py ├── math_func06.py ├── math_func04.py └── .github └── workflows └── homework.yml /README.md: -------------------------------------------------------------------------------- 1 | # Math Function Homework -------------------------------------------------------------------------------- /math_func03.py: -------------------------------------------------------------------------------- 1 | def main(a): 2 | return pow(a, 2) 3 | 4 | print(main(4)) -------------------------------------------------------------------------------- /math_func01.py: -------------------------------------------------------------------------------- 1 | from math import sqrt 2 | def main(a): 3 | return sqrt(a) 4 | 5 | print(main(5)) -------------------------------------------------------------------------------- /math_func02.py: -------------------------------------------------------------------------------- 1 | from math import pi 2 | def main(radius): 3 | length = pi * radius**2 4 | return length 5 | 6 | print(main(16)) -------------------------------------------------------------------------------- /math_func05.py: -------------------------------------------------------------------------------- 1 | from math import cos, degrees 2 | def main(a,b): 3 | c = a * cos(b) 4 | d = degrees(c) 5 | return round(d,2) 6 | 7 | print(main(8,15)) -------------------------------------------------------------------------------- /math_func06.py: -------------------------------------------------------------------------------- 1 | from math import tan, degrees 2 | def main(a,b): 3 | c = a * tan(b) 4 | d = degrees(c) 5 | return round(d,2) 6 | 7 | print(main(18,8)) -------------------------------------------------------------------------------- /math_func04.py: -------------------------------------------------------------------------------- 1 | from math import sin, degrees, radians 2 | def main(a,b): 3 | c = a * sin(b) 4 | d = degrees(radians(c)) 5 | return round(d,2) 6 | 7 | print(main(30,60)) -------------------------------------------------------------------------------- /.github/workflows/homework.yml: -------------------------------------------------------------------------------- 1 | name: Type conversion 2 | on: [push] 3 | jobs: 4 | build: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - name: Checkout 8 | uses: actions/checkout@v2 9 | 10 | # Checkout the repository 11 | - name: Checkout the repository 12 | uses: actions/checkout@v2 13 | with: 14 | repository: codeschooluz/math_function_test 15 | token: ${{secrets.TEST_KEY}} 16 | path: test 17 | - name: Install dependencies 18 | uses: actions/setup-python@v2 19 | with: 20 | python-version: "3.9" 21 | - name: Install pytest 22 | run: | 23 | pip install pytest 24 | - name: Run tests 25 | run: | 26 | pytest -v --tb=no -q --------------------------------------------------------------------------------