Pseudo code in SQL


I have to write a pseudocode program to read the two sample files, calculate and print the final mark for each subject, as well as the average final mark per student.

Document the code well using comments.

The final mark is calculated as 25% of the year mark, 25% of the prac mark and 50% of the exam mark.

Assume the records of the two files are arranged in Student number (S-no) sequence. Note that some students have more subjects than others….

 

I was tasked with the above program and im not sure how to express this in pseudo code.

 


Asked by:- IIShriyaII
0
: 13839 At:- 12/4/2018 4:49:08 PM
SQL Pseudo







1 Answers
profileImage Answered by:- Vinnu

It is difficult to write Pseudo-code in comments, as using comments we can draw/write flow charts, but I can give it a try.

Here are the steps, which may help you to create some Pseudo-code

  1. Get all Students from file where we have Prac,Year and exam marks
  2. Loop each student one by one
  3. Count the Student subjects, and marks in each subject (prac , year and exam marks)
  4. Get final mark of each subject by calculating 25 % of practical, 25%  of yearly marks and 50% of exam marks
  5. Repeat Steps 3 and 4 for all students.

That's it, this is not pseudocode but it may help you to create pseudocode, here are example of it

http://www.unf.edu/~broggio/cop2221/2221pseu.htm

That's it.

 

0
At:- 12/5/2018 9:34:56 AM






Login/Register to answer
Or
Register directly by posting answer/details

Full Name *

Email *




By posting your answer you agree on privacy policy & terms of use