complement_at
def complement_at(x,base=2)
Algorithm
Get the direct Base complemented value from the original x value. The Base must be inferior or equal to 10.
Parameters |
Type |
Description |
x |
int |
The value to be complemented |
base |
int |
The current base |
- Returns
int : The complemented value as an integer
Source Code
return (base-1-x)