Use iteration (for/while loops) and 1D lists to manipulate and process data.
You're helping a school analyze test scores stored in a 1D list. Your job is to write a program that performs different types of analysis.
Task:
Given a list of test scores, use a for loop to:
Print each score
Calculate and print the total score
Calculate and print the average score
Example Input:
python
CopyEdit
scores = [85, 90, 78, 92, 88]
Expected Output:
makefile
CopyEdit
Score: 85
Score:
Average: 86.6
Task:
In addition to the beginner task, use iteration to:
Find the highest and lowest scores in the list
Count how many scores are above 90
Hint: Use variables to track max/min and a counter for scores > 90.
Task:
Write a program that:
Accepts user input for scores (until -1 is entered)
Stores them in a list
Calculates:
Total, average
Highest and lowest scores
Count of scores in grade bands (A: 90+, B: 80–89, C: 70–79, etc.)
Outputs a summary report
Example Output:
yaml
CopyEdit
Number of Scores: 6
Average: 82.3
Highest: 95
Lowest: 67
Grade Counts: A: 2, B: 2, C: 1, D/F: 1
Sort the list before displaying results
Allow the user to remove or update a score
Visualize score distribution using a simple text-based bar chart (e.g., * symbols)