Create a Python function called binaryAdd( ) that takes in twostrings of binary expansions, aand b, and returns the sum of thebinary expansions as a string. For example,
>> binaryAdd(“10101”, “101011”) >> ‘1000000’
What I have so far …
def binaryAdd(a, u):
“””
INPUT: a, u strings of 0’s and 1’s which are the binary reps of aand u
OUTPUT: string representation of the binary sum
“””
c = 0
s = []
k = 0
if (len(a) > len(u)):
k = len(a)
for i in range (len(u), len(a)):
u =
PayPal Gateway not configured
PayPal Gateway not configured