Write a function to determine the bits used by any number


Topic: Write a function to determine the bits used by any number

Solution

def totalBits(n):
	return f'total number of bits used in {n} is : {len(bin(n)[2: ])}'



List all Python Programs