#decoder.py
#Written by Jesse Gallarzo
#add commented code to implement this script in Python 3

binInput=raw_input("Enter 4 bit binary number: ")
#reverse string to account for right-to-left from binary values
#binInput=binInput[::-1]
#TEST CODE ABOVE TO SEE IF APPLICABLE
binValue =1
result=0

for num in binInput:
	if(num=="1"):
		result+=binValue
		binValue*=2
	else(num=="0"):
		binValue*=2
print(result)

@@ -204,17 +204,16 @@
  values%0A
-#
 binInput
@@ -232,46 +232,8 @@
 -1%5D%0A
-#TEST CODE ABOVE TO SEE IF APPLICABLE%0A
 binV
@@ -328,18 +328,8 @@
 else
-(num==%220%22)
 :%0A%09%09

Update decoder.py