100% found this document useful (1 vote)
228 views8 pages

2023 P2 Alevel

The document is an examination paper for the Zimbabwe School Examinations Council's Computer Science A Level Practical exam for November 2023, consisting of three sections with specific instructions for candidates. Candidates must answer one question from each section, print their answers, and include necessary information in the header. The paper includes various programming tasks, logic network problems, and database queries, requiring candidates to demonstrate their practical skills in computer science.

Uploaded by

lorephir
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
100% found this document useful (1 vote)
228 views8 pages

2023 P2 Alevel

The document is an examination paper for the Zimbabwe School Examinations Council's Computer Science A Level Practical exam for November 2023, consisting of three sections with specific instructions for candidates. Candidates must answer one question from each section, print their answers, and include necessary information in the header. The paper includes various programming tasks, logic network problems, and database queries, requiring candidates to demonstrate their practical skills in computer science.

Uploaded by

lorephir
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
@ ZIMBABWE SCHOOL EXAMINATIONS COUNCIL General Certificate of ation Advanced Level COMPUTER SCIENCE 6023/2 PAPER 2 Practical NOVEMBER 2023 SESSION 3 hours Adgitional materials: CD / flash disk for each candidate Printing facitity Bond paper TIME 3 hours INSTRUCTIONS TO CANDIDATES This is a purely practical examination. All answers should be printed. Handwritten answers will not be marked. This paper consists of three sections. Section A 20 marks Section B 50 marks Section C 30 marks Answer one question from each section. Each answer sheet should include the following information in the header section * Candidate Name and Candidate Number © Centre Name and Date © Subject Code When answering programming questions, indicate the language used. All work should be backed up by a soft copy on a CD / flash disk. If you print on more than one sheet, fasten the sheets together. All answers should be correctly and clearly numbered. INFORMATION FOR CANDIDATES. ‘The number of marks is given in brackets [ ] at the end of each question or part question, his question paper consists of 8 printed pages. Copyright: Zimbabwe School Examinations Council, N2023, ‘8ZIMSEC N2023 {Turn over CANOE IIA + ww (b) (b) ‘MOLLE 2 ion A [20 marks] Answer any s sec Answer any one question from this 5 I (w = 1) when the process goes A chemical plant gives out a warning signal \d decide whether or not Wrong. A logic network is used to provide input an wel, i Plant status pane Chemical Rate = 10 ms 0 Chemical Rate< 10 m*/s T T Temperature = 87°C 0 Temperature > 87°C x 1 Concentration > 2 moles L 0 Concentration = 2 moles A waming signal (w = 1) will be generated if either a) Chemical Rate <10m'/s OR b) Temperature > 87°C and Concentration > 2 moles OR c) Chemical rate = 10m?/s and Temperature > 87°C (@ Formulate a logic expression for the conditions, By (Draw a logic network to represent how this chemical plant is. ” a7 PI monitored, a] Gil) Compute a truth table for the logic network in Gi). [5] Draw a clearly labelled diagram that represents the Von Neumann Architecture. [5] Draw the logic circuit for each of the Boolean expressions given below @ [Link] [2] i) =o (i) (P+Q). (PER) By ' i (©) In aprocessor three instructions (J followed by K. followed by M) are Processed using pipelining : The following table shows the five stages that occur when instructions are fetched and executed. STAGE TIME INTERVAL Fetch instruction 11213 [4 [s fo [7] sto Decode instruction J 4 i cute instruction ‘Access operand in memory White result to register | (i) The ‘J! in the table indicates that instruction has been fetched in time interval | Copy and complete. the table to show the time interval in which each stage of each instruction (J, K, M) is carried out. a) (ii) The completed table shows how pipelining allows instructions to be carried out more rapidly. Each time interval represents one clock cycle Calculate how many clock cycles are saved by the use of pipelining in the above example. Show your working BI e7 Noes {Turn over {AEINAQ HULA URE A 3 (b) ©) (mu Gi) Produce program code that reads the content of 4 Section B [80 marks] Answer any one question fiom this section Podtoce a program using a high level programming lay . The program should output the Fibonaced sequettce up to the 180) element The first 12 elements ane as follows: 0,1,1,2,3,5, 8.13, 21, 34, $8, 89 . ‘Your program should use an iterative method lo) The same task can be accomplished using the following recursive ted * where ‘iis the element number 2 forthe case where ¢= (first element) ; * for the case where i = 2 (second element) fib of = 0 > fibofist * for the case where i= 2 third element upward) > fib of t= fib of G2) + fb of @— 1) ts] Produce a recursive fimetion only: for the Fibo S wa high For this task, you are required to produce a program us {evel programming language that works with 2 fi + opens file 1 for reading + opens file 2 for writing (Use a text editor to create a text file with the following content: = * use Consolas [Thisis SLine2> | Number 1 is: | Number 2 My name is: * end of Consolas / courier Produce a sereen shot of the typed file showing the text content as above. GB) le Land then writes it to File 2 as follows: - * use Consolas / Courier font Sample Output hes This is my source file < Line 2> < centre number > Number 1 is: 0100015 < candidate number > Number 2 is: 0050 < Name, Surname > My Name is: Chipo Made < Date / time stamp > 01/01/2020 * end of Consolas / courier font * NB: Submit only your source code for this ques {4} cana Net © Zimsec 202° (d) (e) © (a) (b) (c) @ ® s Produce a an array of: ae using the high level programming language that initialives *N ‘Character: i of the N.B ASCII code fos '4 Se tenet Nersiphales 7 Produce pa othe by copying and modifying your code from (d) above The program in characters, (capital + Amay should is case works with a2 D array, each element containing, 2 letters and small letters) bea 20x20 elements, “N.B ASCII code for ‘a’ = 97 {io} pukiblication can be considered wo be repeated addition eoduce a program using pseudocode ora high level programming language that multiplies 2 positive integers. * The program should implement an iterative function (A full description of function is required), There should (only this line is required) be a calling statement in the main program. (8) Produce a program that prints out characters whose values range from exclamation to backslash in a list box. NOTE ASCII value of ! = 33 and /= 47 {4 Design an interface and code for a program that converts unsigned integer number (whole number) to its binary equivalent i] Produce a code that inputs 10 items and then outputs the weight of the heaviest and the lightest item. The code should also output the average weight of all items. Produce a screen shot for your answer. (6) A perfect positive number is called perfect if the gum of its factors is equal to twice the number. It is called abundant if the sum of its factors is greater tha twice the number, It is called deficient ifthe sum of its factors is less. than fwice the number. = Produce a program code that reads a number and prints out whether it is perfect, abundant or defient. ro} The employees of a company all have 8-character personnel numbers. E301 cue'oet An algorithm will do the following: y nuelelT Enter the number and then test if it contains exactly 8 characters, less" 4" than 8 characters or more than 8 characters. Display appropriate messages for each condition. wi Produce an algorithm in the form of a pseudocode for the above narration. a ii) produce a code for your pseudocode in (i) above. Be Oe NO ayers {Turn over io > ae a A ewe ef princes anges 18 mnanvers adh net ee he peared ot Prepon recente bens dered aialiiensanel Yee eo ae He eee utes, evens ve An sesaen = je 1 ere Hg the ern = wened ens 6 Che po mee ene eee (Bree shee amen ae ae prac Cores wnmrene ameninat 1 sows There ave een eres "C139 Marks) © Gabaza video elyt “OM From this soc Without normatisagn I data, oa t infoy tase oF movies to hy Ee ion » be rented out, Nii = “SOF in one ables shown blo [ip Moko 1 Mrs Movie Rented Category 2 Pirates Titans Action, | Action ¥ RB Educational Comed eS Action Normalise the le to “0nd normal lay [Student-ID_] 4241 [Sport [Venue la741 ticket Harare l4ss8. soccer Harare 4740 Sean vole Kwekwe ra Toa volley Mutare 4742 Sindiso a Mae 4444 Thubant ‘Soccer Mutare @ Using DBMS of your choice, identity the Primary key and create the sport table above. 1a (ii) Create a query to diply a heed of students who play cricket, print a. the screen shot and the SQL code. ‘Muganu from the table. Print (iii) Produce the delete query to remove Farai Mugar ue the screen shot and SQL code. os th, dated query to add the flowing rand 4748, Kennet i Ge) Fraduce | Giver, Print the result and the SQL. Shawa, soccer, [Turn over ox ite has a relational database, SCHOOLWEB, that stores the ation. has 3 tables to store student 1 details, image details and text that they post ent ID, Surname, First Name, Date of Birth) sto ID, Student ID, Comment, Upload Date) ‘Text Post (Post ID, Student ID, Date of post, The Text) Explain how the relationship between the tables Student and Photo has ci 2) been implemented. (ii) Draw the ERD to show the relationship between the 3 tables. For fields, only include the primary keys on the ERD. 7) (b) The following table shows sample data for a student table. Student 1D) First Name ‘Surname Date of Birth ‘tinol23, Tinotenda ‘Mutamba 01/01/95 | jackmoyo Jacob ‘Moyo 73/02/56 ‘muteroa ‘Anes Mutero 03/03/97 bigboss3 Mazvita Tongogara (04/03/82 (i) Produce an SQL statement to create the student table above. (5) (ii) Produce an SQL statement to add a new fiéld, country, to the student table. 2 (ii) Produce an SQL statement to display all attributes for students who were bom before 1990. B] (iv) Produce an SQL statement to display all records in descending order of student surname. (©) Drawa well-labelled diagram showing the 3-layered schema of the D: Management System (DBMS). Sree Give a brief description of each layer. [8] ons/a Na02s

You might also like