Not sure what I've done wrong here tried lots of alternative combinations and not sure why this logic doesn't work! Im pretty sure it has something to do with the parameter not reading as the results inputted aren't going through the loop. Any help would be appreciated! The idea of the function is to add up marks scored by diferent people and in the end outputting as shown below.
def Marks(*score):
marks0 = 0
marks1 = 0
marks2 = 0
marks3 = 0
marks4 = 0
marks5 = 0
if score == 0:
marks0 = marks0+1
elif score == 1:
marks1 = marks1+1
elif score == 2:
marks2 = marks2+1
elif score == 3:
marks3 = marks3+1
elif score == 4:
marks4 = marks4+1
elif score == 5:
marks5 = marks5+1
print "0 marks scored by", marks0 , "people."
print "1 mark scored by", marks1 , "people."
print "2 marks scored by", marks2 , "people."
print "3 marks scored by", marks3 , "people."
print "4 marks scored by", marks4 , "people."
print "5 marks scored by", marks5 , "people."