Help please :)
FARHEENPALAGIRI (11)

Hi everyone. I've been working on this code for like three weeks and I have no idea how to do it. So basically the code tells you how many pairs of equal numbers there are in an inputted list. The way I tried to solve it is that I compared the first number in the list to all the others, then had that first number delete itself, and then had the new first number compare to all the others. When the length of the list is at one, the code is supposed to break. But nothing I do works when working on this code. Help me please? Thanks.

You are viewing a single comment. View All
ash15khng (234)

Line 9, when length of a is 1, you should get a[0].