A ( 8. Write a function which is given an exam mark, and it returns a string - the grade for that mark according to this scheme: | Mark Grade >= 75 First [70-75) Upper Second [60-70) Second [50-60) Third [45-50) F1 Supp [40-45) F2 < 40 F3 The square and round brackets denote closed and open intervals. A closed interval includes the number, and open interval excludes it. So 39.99999 gets grade F3, but 40 gets grade F2. Assume project.net/thinkcs/python/english3e/conditionals.html[1/4/2012 9:37:12 PM] - How to Think Like a Computer Scientist: Learning with Python 3 [83, 75, 74.9, 70, 69.9, 65, 60, 59.9, 55, 50, 49.9, 45, 44.9, 40, 39.9, 2, 0 XS = Test your function by printing the mark and the grade for all the elements in this list.
A ( 8. Write a function which is given an exam mark, and it returns a string - the grade for that mark according to this scheme: | Mark Grade >= 75 First [70-75) Upper Second [60-70) Second [50-60) Third [45-50) F1 Supp [40-45) F2 < 40 F3 The square and round brackets denote closed and open intervals. A closed interval includes the number, and open interval excludes it. So 39.99999 gets grade F3, but 40 gets grade F2. Assume project.net/thinkcs/python/english3e/conditionals.html[1/4/2012 9:37:12 PM] - How to Think Like a Computer Scientist: Learning with Python 3 [83, 75, 74.9, 70, 69.9, 65, 60, 59.9, 55, 50, 49.9, 45, 44.9, 40, 39.9, 2, 0 XS = Test your function by printing the mark and the grade for all the elements in this list.
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter9: Completing The Basics
Section9.4: Character Manipulation Functions
Problem 5E
Related questions
Question
How do you do this?
Expert Solution
Explanation
1) Below is program to define the function which returns grade for a mark. Test with list of marks
- It define function to return grade for a mark
- check the mark and return the grade
- In main of program
- It define list of marks
- Iterate through list of marks
- Display Marks and Grade return from grade function
2) Save program in python file and run
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
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.Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning