10. Counting Large Values(practice problem)

Hi Sir/Ma’am, in the problem below how can i decide when to make a list and append values or when to create num_bigger = 0 and add +1 to the value like it is given in answer? i understood that we have to count numbers but can we do with the code i wrote?

Screen Link:

My Code:

num_bigger = []

for value in values:
    if value > 100:

What I expected to happen: The output came but i got error below while submitting.

What actually happened:

num_bigger is a list, but we expected it to be a int.

Your code works fine. Kindly refresh the coding pane or your tab.

You can apply any logic. It is just that the pratice problems are to get familiarized with conditional statements. So, the answer uses most used basic approach.

There is no wrong in using other logic like the one you used.