numerical
is_power_of_two(number)
Check if a number is a power of two.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
number |
int
|
The candidate |
required |
Returns:
Type | Description |
---|---|
bool
|
Whether or not it is a power of two |
Source code in staff/numerical.py
4 5 6 7 8 9 10 11 12 13 14 15 |
|