# Arup Guha
# 6/10/2025
# List Operations

# This function will return the number of scores in the list scores
# that are greater than or equal to cutoff.
def numScoresAbove(scores, cutoff):

    res = 0

    # Go through each score.
    for i in range(len(scores)):

        # Add 1 only if the score is good enough.
        if scores[i] >= cutoff:
            res = res + 1

    # This is the answer.
    return res

# Get the number of students.
n = int(input("How many test scores to enter?\n"))

# This is an empty list.
scores = []

# Read in n scores and add each to the list.
for i in range(n):
    curscore = int(input("Enter the next score.\n"))
    scores.append(curscore)

# For testing.
print(scores)

# Figure out how many passed.
cutoff = int(input("What is passing?\n"))
numPass = numScoresAbove(scores, cutoff)
print(numPass,"students passed.")
