I am trying to create basic survey program that asks questions and takes a numerical result from the answer and finds the average. i.e. A=10, B=5, C=0. I'm having two basic problems, the first and more important is adding the result to the list. The second is a formatting issue: I keep receiving an 'unexpected indent' or 'indent does match outer indentation layer' error on the append lines. I would appreciate any thoughts.
analyzing simple survey data for political affiliation
voter = list()
def question_1(x):
if x == "A":
print 10
voter.append(10)
elif x == "B":
print 5
voter.append(5)
elif x == "C":
print 0
voter.append(0)
else:
print "Not a valid answer"
def question_2(y):
if y == "A":
print 10
voter.append(10)
elif y == "B":
print 5
voter.append(5)
elif y == "C":
print 0
voter.append(0)
else:
print "Not a valid answer"
def question_3(z):
if z == "A":
print 10
voter.append(10)
elif z == "B":
print 5
voter.append(5)
elif z == "C":
print 0
voter.append(0)
else:
print "Not a valid answer"
def question_4(a):
if a == "A":
print 10
voter.append(10)
elif a == "B":
print 5
voter.append(5)
elif a == "C":
print 0
voter.append(0)
else:
print "Not a valid answer"
def question_5(b):
if b == "A":
print 10
voter.append(10)
elif b == "B":
print 5
voter.append(5)
elif b == "C":
print 0
voter.append(0)
else:
print "Not a valid answer"
def get_average():
average = sum(voter)/len(voter)
print average
question_1(raw_input('what is your position on issue 1: A, B, or C'))
question_2(raw_input('what is your position on issue 2: A, B, or C'))
question_3(raw_input('what is your position on issue 3: A, B, or C'))
question_4(raw_input('what is your position on issue 4: A, B, or C'))
question_5(raw_input('what is your position on issue 5: A, B, or C'))
get_average()