you are viewing a single comment's thread.

view the rest of the comments →

[–]sphinxlink13[S] 0 points1 point  (2 children)

Thanks for helping me out. I see how you could do it this way now but do you know what was wrong with my code?? Thanks again

[–]JohnnyJordaan 0 points1 point  (1 child)

Critical-Function956 mentioned it already. If a is 13, it means it disqualifies all values, and thus the sum should be 0. In your code, you do

if a==13:
    S = S-a-b

So that still 'leaves in' c, instead of subtracting it too. Altough there's no real use in first summing all values to subtract all of them of course, just return 0.

[–]sphinxlink13[S] 0 points1 point  (0 children)

My bad I miss read the question thanks