Guess the pattern

Use the test to guess the pattern used by the function and implement it using Python.

Test Cases

test your function - Run Test

def test_your_function():
    assert my_function(2) == 10
    assert my_function(3) == 15
    assert my_function(5) == 25
    assert my_function(9) == 45

Solution 1

def my_function(x):
    return x * 5
def my_function(x): pass