Your question is Reverse Bits in One Byte. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given an integer n representing an 8-bit unsigned value (0 to 255), return the integer produced by reversing its 8 bits. For example, if the binary form is 00000101, the reversed result is 10100000. The function should return the reversed value as an integer.
def reverse_bits_8(n):