INFOTECH Coding Question – Solved

6 Live
You are helping your professor at the university to generate a report containing three columns: name, grade, and mark. You are given a table of grades and students. Your professor has instructed you to create the report according to the following specifications: - He doesn't want the names of those students who received a grade lower than 'C'. - Higher grades in the report should be entered first. - If there is more than one student with the same grade (C - A) assigned to them, order those particular students by their name alphabetically. - Finally, if the grade is lower than 'C', use "NULL" as their name and list them by their grades in descending order. If there is more than one student with the same grade (F - D) assigned to them, order those particular students by their marks in ascending order. The grades table contains the following columns: - grade: letter from A to F - min_mark: the minimum mark a student must achieve in order to reach this particular letter grade - max_mark: the maximum mark a student can achieve in order to get this particular grade

Asked in: INFOTECH

Image of the Question

Question Image

All Testcases Passed βœ”



Passcode Image

Solution


Please login to view the solution


Related Questions

| You are given a board of size M Γ— N where each cell can be either empty ('O') o… |
| Undirected Coloured Graph Shortest Path You are given an undirected weight… |
| Village Voyage A computer game "Village Voyage" has N villages (labeled 1 to… |
| Academic Decathlon Students are being selected for an academic decathlon tea… |
| Sum of Arrays Given two arrays each of length n, arr1 and arr2, in one opera… |
| Count Swaps During Custom Sorting Analyze the efficiency of the following so… |