Write a function that parses a binary number as a string into a decimal integer. Use the function header:def binaryToDecimal(binaryString):For example, binary string 10001 is 17 (1 x 24+ 0 x 23+ 0 x 22+ 0 * 2 + 1 =17)So, binaryToDecimal("10001") returns 17.Write a test program that prompts the user to enter a binary string and displays the corresponding decimal integer value.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here