Objective
Write a function that exchanges the upper nibble and the lower nibble of a byte and returns the result.
Steps
$ swap_bits(0xF0)
15
$ swap_bits(0xAB)
186
Expected files
Allowed functions
None. Write every helper yourself.

Objective
Write a function that exchanges the upper nibble and the lower nibble of a byte and returns the result.
Steps
$ swap_bits(0xF0)
15
$ swap_bits(0xAB)
186
Expected files
Allowed functions
None. Write every helper yourself.

Tests
Run the tests to grade your code