scores = [80, 0, 90, 70] total = 0 count = 0 for i in range(len(scores)): if scores[i] > 0: total += scores[i] count += 1 total = total / count print(round(total, 1))
To embed this project on your website, copy the following code and paste it into your website's HTML: