-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMini Project 6.py
More file actions
30 lines (30 loc) · 1.13 KB
/
Mini Project 6.py
File metadata and controls
30 lines (30 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Python 3.11.1 (v3.11.1:a7a450f84a, Dec 6 2022, 15:24:06) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license()" for more information.
>>>
... quiz_scores = []
... project_scores = []
... total_score = 0
...
... print("Please enter scores for 10 quizzes (out of 20):")
... for i in range(10):
... score = int(input(f"Quiz {i+1}: "))
... quiz_scores.append(score)
... total_score += score
...
... print("\nPlease enter scores for 10 mini-projects (out of 20):")
... for i in range(10):
... score = int(input(f"Mini-project {i+1}: "))
... project_scores.append(score)
... total_score += score
...
... quiz_avg = sum(quiz_scores) / len(quiz_scores)
... project_avg = sum(project_scores) / len(project_scores)
... overall_avg = total_score / 20
... highest_score = max(quiz_scores + project_scores)
... lowest_score = min(quiz_scores + project_scores)
...
... print(f"\nQuiz average: {quiz_avg:.2f}")
... print(f"Mini-project average: {project_avg:.2f}")
... print(f"Overall average: {overall_avg:.2f}")
... print(f"Highest score: {highest_score}")
... print(f"Lowest score: {lowest_score}")