Skip to main content

Notes

Numbers

10 ** x = 2 ** y

# Given y
x = math.ceil(y * math.log10(2))

# Given x
y = math.ceil(x * math.log2(10))

# Given num
x = math.log10(num)
y = math.log2(num)

Strings

# Check if character is digit
ch.isdigit()