import math print(math.log2(4)) print(math.log2(8)) print(math.log2(64)) print(math.log2(100))>>> import math >>> math.log(10, 1000) 0.33333333333333337import math #E.g log_2(8) result = math.log(8,2)def log(x,base): result = ln(x)/ln(base) return result def ln(x): n = 100000.0 return n * ((x ** (1/n)) - 1) print(log(2,4)) #code by fawlid//Logarithm Functions print(math.log(10)) print(math.log(10, 10))import logging # Set up the logger logging.basicConfig(level=logging.DEBUG) # Log messages logging.debug("Debug message") logging.info("Info message") logging.warning("Warning message") logging.error("Error message") logging.critical("Critical message")