math.log2()

http://www.adilwaseem.com/

Introduction
The function will returns base 2 log of x.

Syntax
math.log2(x)

Parameters
x=number

Examples
 >>>import math
>>> math.log2(33)
5.044394119358453
>>> math.log2(65)
6.022367813028454
>>> 

if statement sum(map(lambda).__le__()
The lambda returns with equation computation.
import math
x=[math.log(2,10),math.log10(22), math.log2(2)]
y=[math.trunc(2.1)]
if sum(map(lambda a,b: a+b/2, x,y)).__le__(y):
    print("The return is large or equal to 2.0")
else:
    print("The value does not meet the criteria")

>>> 
The return is large or equal to 2.0
>>>


Comments