Presentation is loading. Please wait.

Presentation is loading. Please wait.

Part 12 Q56 to Q60 of National 5 Prelim

Similar presentations


Presentation on theme: "Part 12 Q56 to Q60 of National 5 Prelim"— Presentation transcript:

1 Part 12 Q56 to Q60 of National 5 Prelim
Revision Part 12 Q56 to Q60 of National 5 Prelim

2 Revision Part 12 56 Describe what happens to the data when the following SQL line is added to Q55’s statement: ORDER BY customer name ASC 1 57 Describe what happens to the database when the SQL statement is run: UPDATE customers SET surname = Clooney WHERE surname = Cloonie 58 State a suitable complex condition for a program that will display “PASS” when a student has got 50% and over for both their coursework and their exam. 3 59 A program is needed to enter 20 pupil names and exam marks and display the average exam mark. Write the program using pseudo code as efficiently as possible. 5 60 The program used in Q58 needs to include a section of code which makes sure the exam mark entered is between 0 and 100. Write the pseudocode for this.

3 Revision Part 12 56. Describe what happens to the data when the following SQL line is added to Q55’s statement: ORDER BY customer name ASC. (1) The data from Q55 is put in ascending order using the customer name field.

4 Revision Part 12 57. Describe what happens to the database when the SQL statement is run: UPDATE customers SET surname = Clooney WHERE surname = Cloonie .(1) The customer table is modified/edited/updated, changing every surname “Cloonie” to “Clooney”.

5 Revision Part 12 58. State a suitable complex condition for a program that will display “PASS” when a student has got 50% and over for both their coursework and their exam. (3) IF coursework => 50 AND exam => 50 THEN SEND “Pass” TO DISPLAY END IF

6 Revision Part 12 59. A program is needed to enter 20 pupil names and exam marks and display the average exam mark. Write the program using pseudo code as efficiently as possible. (5) FOR COUNTER = 0 TO 19 RECEIVE pupil_name(counter) FROM KEYBOARD RECEIVE exam_mark(counter) FROM KEYBOARD SET total TO total + exam_mark(counter) NEXT SET average TO total / 20 SEND average TO DISPLAY

7 Revision Part 12 60. The program used in Q58 needs to include a section of code which makes sure the exam mark entered is between 0 and 100. Write the pseudocode for this. (3) RECEIVE exam_mark(counter) FROM KEYBOARD DO WHILE exam_mark < 0 OR exam_mark > 100 SEND “Incorrect Range” TO DISPLAY LOOP


Download ppt "Part 12 Q56 to Q60 of National 5 Prelim"

Similar presentations


Ads by Google