79804461

Date: 2025-10-30 06:57:07
Score: 0.5
Natty:
Report link

# --------------------------------------------

# Program: Count Passed and Failed Students

# --------------------------------------------

# Step 1: Create a list of exam scores for 25 students

scores = [45, 78, 32, 56, 89, 40, 39, 67, 72, 58,

      91, 33, 84, 47, 59, 38, 99, 61, 42, 36,

      55, 63, 75, 28, 80\]

# Step 2: Set the minimum passing score

passing_score = 40

# Step 3: Initialize counters for passed and failed students

passed = 0

failed = 0

# Step 4: Go through each score in the list

for score in scores:

\# Step 5: Check if the student passed or failed

if score \>= passing_score:

    passed += 1       # Add 1 to 'passed' count

else:

    failed += 1       # Add 1 to 'failed' count

# Step 6: Display the results

print("--------------------------------------------")

print("Total number of students:", len(scores))

print("Number of students passed:", passed)

print("Number of students failed:", failed)

print("--------------------------------------------")

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Filler text (0.5): --------------------------------------------
  • Filler text (0): --------------------------------------------
  • Filler text (0): --------------------------------------------
  • Filler text (0): --------------------------------------------
  • Low reputation (1):
Posted by: Joe