# Write a python function to convert from base 2 to base 10 in pythonpython by TheRubberDucky on Nov 06 2020 Donate

## Topic: Write a python function to convert from base 2 to base 10 in pythonpython by TheRubberDucky on Nov 06 2020 Donate

Solution

def getBaseTen(binaryVal): count = 0 binaryVal = binaryVal[::-1] for i in range(0, len(binaryVal)): if(binaryVal[i] == "1"): count += 2**i return count

List all Python Programs