Coded Handshake

A secret handshake can be encoded as a number, where each enabled bit adds one action. The function commands receives number and returns the list of actions it represents. Bits 1, 2, 4, and 8 add wink, double blink, close your eyes, and jump; bit 16 reverses the order of the commands.

Примеры

Ввод
1
Вывод
["wink"]
Ввод
2
Вывод
["double blink"]
Ввод
4
Вывод
["close your eyes"]

Нужно реализовать

def commands(number: int) -> list[str]:

Теги

listsmath
PostgreSQLv16

Hier erscheint das Ergebnis der Codeausführung

Visible tests
1
Input
1
Expected["wink"]
2
Input
2
Expected["double blink"]
3
Input
4
Expected["close your eyes"]
4
Input
8
Expected["jump"]
5
Input
3
Expected["wink","double blink"]
6
Input
19
Expected["double blink","wink"]
Focus radio
Paused · SomaFM · Fluid