Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create test for exponentiation operation #13

Open
dct0 opened this issue Nov 22, 2024 · 0 comments
Open

Create test for exponentiation operation #13

dct0 opened this issue Nov 22, 2024 · 0 comments
Labels

Comments

@dct0
Copy link
Contributor

dct0 commented Nov 22, 2024

Task

Create the test for the exponentiation operation. This can be seen in test_operations.py with the function called test_exponentiation.

Acceptance Criteria

  • the test should fail if exponentiation is mathematically wrong
  • the test should succeed if exponentiation is mathematically correct

Answer

Note: It is not expected that you know how to write tests, your goal is to understand what the below code does and perform the change on your branch that you have created and create a pull request

def test_exponentiation()
"""
GIVEN: two numbers
WHEN: passed in to the function division
THEN: the resulting is the exponentiation of the two numbers
"""
assert exponentiation(2, 5) == 32
assert exponentiation(3, 3) == 27
assert exponentiation(4, 1) == 4
@dct0 dct0 added the test label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant