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

Koodin suorituksen tulos näkyy tässä

Tests12
Visible tests
Piilotettu testi 7
Piilotettu testi 8
Piilotettu testi 9
Piilotettu testi 10
Piilotettu testi 11
Piilotettu testi 12

They run when you press "Submit" — your whole solution is checked against them so you can't hard-code answers for the visible cases.

Focus radio
Paused · SomaFM · Fluid