def my_function(x): return abs(x) * 2
Time is over! You can keep submitting you assignments, but they won't compute for the score of this quiz.
Guess the pattern
Use the test to guess the pattern used by the function and implement it using Python.
abs python function might be handy ;)
test your function - Run Test
def test_your_function(): assert my_function(2) == 4 assert my_function(3) == 6 assert my_function(-1) == 2 assert my_function(-3) == 6