Write and execute a program to do the following: - 1) Ask the user the user to input marks in integer for 10 students. You can use the following marks as initial values 2) Define a function that takes an integer mark and returns its letter grade according to the following table :- Grade A Mark 90 s mark 80s mark< 90 60 s mark< 80 mark < 60

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 1TF: Mark the following statements as true or false: a. To use a predefined function in a program, you...
icon
Related questions
Question
100%
Q2: marks.py
Write and execute a program to do the following: -
1) Ask the user the user to input marks in integer for 10 students.
You can use the following marks as initial values
131. 90 60 59 4 88 69 88 92
2) Define a function that takes an integer mark and returns its letter
grade according to the following table :-
Grade
A
Mark
90 s mark
80 s mark < 90
60 s mark < 80
mark <60
3) Call the above function to calculate the letter grade for each student and
store it in the new list Grade
4) Calculate average of all marks.
5) Calculate number of students whose letter grade is "A".
6) Calculate number of students with marks greater than average.
7) Display your output as follows: -
Mark
73
Grade
71
90
60
A
59
74
88
69
88
92
Average of all marks :...
Number of atudents whose letter grade is "A": ...
Nunber of students with marks greater than average: ...
3
A. Marking Criteria
Category
Completeness and correctnes (see the matrix below)
Code Layout
1f consistent layout and use of proper indentation and separation between different parts of
code of not uning proper indentation or the layout is not consistent
Max
1
Code Comments
1fusing comments in the beginning of each source file and using comments to explain the
code oif not using comments
Code identifiers and Variable Names
1f al identifiers are meaningful and helpful (eg. num_of_students)
Of some identifiers are short or misleading (eg., not capitalzing named constants)
as
15
Output Organization and Formatting
1f the output is spelt comeatly, organized, aligned, and formatted for maximum readability by the user.
Of the output is not clear, not aligned, or difficult to understand because of unclear instruction and spelling errors
Table 1: Marks breakdown
Almost Half
correct correct wrong
6.
4
Fully
Mostly All
correct
wrong
4
Fully completed
Almost completed
Half completed
Slight evidence of progress 2
Noise or all irrelevant
4
3
1
3
2
1
2
2
|1
3
Table 2: Correctness Matrix
B. Academic Integrity
In case an accusation of cheating during a quiz or an examination is proven, the follwing will be imposed:
Disciplinary Action for Cheating Case/s:
• First Offense (Zero Mark).
Second Offense (Dismissal from the College).
- - N .
Transcribed Image Text:Q2: marks.py Write and execute a program to do the following: - 1) Ask the user the user to input marks in integer for 10 students. You can use the following marks as initial values 131. 90 60 59 4 88 69 88 92 2) Define a function that takes an integer mark and returns its letter grade according to the following table :- Grade A Mark 90 s mark 80 s mark < 90 60 s mark < 80 mark <60 3) Call the above function to calculate the letter grade for each student and store it in the new list Grade 4) Calculate average of all marks. 5) Calculate number of students whose letter grade is "A". 6) Calculate number of students with marks greater than average. 7) Display your output as follows: - Mark 73 Grade 71 90 60 A 59 74 88 69 88 92 Average of all marks :... Number of atudents whose letter grade is "A": ... Nunber of students with marks greater than average: ... 3 A. Marking Criteria Category Completeness and correctnes (see the matrix below) Code Layout 1f consistent layout and use of proper indentation and separation between different parts of code of not uning proper indentation or the layout is not consistent Max 1 Code Comments 1fusing comments in the beginning of each source file and using comments to explain the code oif not using comments Code identifiers and Variable Names 1f al identifiers are meaningful and helpful (eg. num_of_students) Of some identifiers are short or misleading (eg., not capitalzing named constants) as 15 Output Organization and Formatting 1f the output is spelt comeatly, organized, aligned, and formatted for maximum readability by the user. Of the output is not clear, not aligned, or difficult to understand because of unclear instruction and spelling errors Table 1: Marks breakdown Almost Half correct correct wrong 6. 4 Fully Mostly All correct wrong 4 Fully completed Almost completed Half completed Slight evidence of progress 2 Noise or all irrelevant 4 3 1 3 2 1 2 2 |1 3 Table 2: Correctness Matrix B. Academic Integrity In case an accusation of cheating during a quiz or an examination is proven, the follwing will be imposed: Disciplinary Action for Cheating Case/s: • First Offense (Zero Mark). Second Offense (Dismissal from the College). - - N .
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Returning value from Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr