Information Technology 9626 · 21

Programming for the web

166 questions. Open a question to solve it and check the official answer.

2020 October-November · Paper 32 · Q1(a)(iv)

Programming for the web · 1 mark · official answer ready

(iv) operator ........................................................................................................................................... .........................…

2020 October-November · Paper 32 · Q1(a)(v)

Programming for the web · 1 mark · official answer ready

(v) statement ........................................................................................................................................... .........................…

2020 October-November · Paper 32 · Q1(b)

Programming for the web · 4 marks · official answer ready

(b) Describe, in detail, the use of console.log() in JavaScript to output data for display. .......................................................................................…

2020 October-November · Paper 33 · Q5(a)

Programming for the web · 0 marks · official answer ready

5 (a) The JavaScript code shown in Fig. 5.1 adds together 12 and 6 to produce the result 18. Line numbers are shown only for reference purposes. 1 2 3 4 5

2020 February-March · Paper 04 · Q5

Programming for the web · 15 marks

5 Open the MarkConversionTask.html file in a text editor. Add JavaScript code to prompt the user to enter a mark and display the mark entered and the correct grade using the text:…

2020 February-March · Paper 32 · Q2(b)

Programming for the web · 8 marks · official answer ready

(b) Describe four form controls that could be used on the new booking screen and for each form control describe an appropriate use on the new screen. .............................…

2020 February-March · Paper 32 · Q9

Programming for the web · 0 marks

9 In JavaScript, conditional statements can be used to carry out specific actions based upon different conditions. The value of the variable ‘age’ is entered into a web page and c…

2020 February-March · Paper 32 · Q9(a)

Programming for the web · 6 marks · official answer ready

(a) Explain, with reference to the code in the function, how the ‘if else’ and ‘else if’ statements operate to provide the appropriate statement when an age is entered into the we…

2020 February-March · Paper 32 · Q9(b)

Programming for the web · 4 marks · official answer ready

(b) The code could have been written using the ‘switch’ function, e.g. lines 4 to 7 could have been: 4 switch(true) { 5 case age < 10: 6 statement = "You are not old enough to go …

2020 February-March · Paper 32 · Q10(a)

Programming for the web · 6 marks

10 } Fig. 9.1 (a) Explain, with reference to the code in the function, how the ‘if else’ and ‘else if’ statements operate to provide the appropriate statement when an age is enter…

2019 October-November · Paper 31 · Q11

Programming for the web · 0 marks · official answer ready

11 The area of a rectangle can be calculated using the JavaScript embedded in a web page as shown below. 1 2 3 4 var length = parseFloat(prompt("Enter length of the rectangle : ")…

2019 October-November · Paper 31 · Q19

Programming for the web · 6 marks

19 17 Explain, with reference to the code shown, how the JavaScript collects the dimensions of the rectangle, calculates the area and displays the area on-screen. The lines of the…

2019 October-November · Paper 32 · Q3

Programming for the web · 0 marks · official answer ready

3 JavaScript uses strings to store data. This script is intended to display the contents of three variables on a web page. Line numbers are provided only for your convenience when…

2019 October-November · Paper 32 · Q12

Programming for the web · 3 marks · official answer ready

12 Explain, giving reasons, why no output is produced when this JavaScript is executed by a web browser as part of a web page. ....................................................…

2019 October-November · Paper 32 · Q15(a)

Programming for the web · 8 marks

(a) Explain, in detail, how the JavaScript code produces this list from an array. corn rice maize sugarcane .......................................................................…

2019 October-November · Paper 32 · Q15(b)

Programming for the web · 36 marks

(b) Explain how you would amend the existing JavaScript code to add ‘beans’ to the array so that it would produce this list. beans corn rice maize sugarcane ......................…

2019 October-November · Paper 33 · Q11

Programming for the web · 0 marks · official answer ready

11 The area of a rectangle can be calculated using the JavaScript embedded in a web page as shown below. 1 2 3 4 var length = parseFloat(prompt("Enter length of the rectangle : ")…

2019 October-November · Paper 33 · Q19

Programming for the web · 6 marks

19 17 Explain, with reference to the code shown, how the JavaScript collects the dimensions of the rectangle, calculates the area and displays the area on-screen. The lines of the…

2019 October-November · Paper 4 · Q4(a)

Programming for the web · 5 marks

4 (a) Open the Scroller.html file in a browser. Use the Next and Previous buttons to scroll through the images. There is an error in the script that is used to display the images.…

2019 October-November · Paper 4 · Q4(b)

Programming for the web · 6 marks

(b) Amend the scroller so that instead of displaying alerts, the scroller cycles through the images, forwards and backwards, continuously. Insert programmer comments to explain an…