8.1 Programming concepts
171 questions in this subtopic. Open a question to solve it and check the official answer.
Programming concepts · 8 marks · official answer ready
(a) Give the line number(s) for the statements showing: Totalling .................................................................................................................…
Programming concepts · 2 marks · official answer ready
(a) Write pseudocode statements to declare the variables P and Q, store "The world" in P and store 'W' in Q .......................................................................…
Programming concepts · 4 marks · official answer ready
(b) Write a pseudocode algorithm to: • convert P to upper case • find the position of Q in the string P (the first character in this string is in position 1) • store the position …
Programming concepts · 15 marks · official answer ready
12 A two-dimensional (2D) array Account[] contains account holders’ names and passwords for a banking program. A 2D array AccDetails[] has three columns containing the following d…
Programming concepts · 1 mark · official answer ready
1 Tick (3) one box to complete the sentence. A constant A stores a value that can change at any time during the execution of a program. B stores a value that cannot change during …
Programming concepts · 4 marks · official answer ready
2 Explain the purpose of the library routines MOD and RANDOM MOD ..................................................................................................................…
Programming concepts · 3 marks · official answer ready
3 Describe what happens when a function is called during the execution of a program. ..............................................................................................…
Programming concepts · 3 marks · official answer ready
(b) Write an algorithm in pseudocode to make sure that an input for the variable Length is between 15 and 35 inclusive. The code must iterate until a valid input has been made and…
Programming concepts · 5 marks · official answer ready
(b) Describe the changes you should make to the corrected algorithm so that a count-controlled loop is used to allow 100 positive numbers to be input. You do not need to rewrite t…
Programming concepts · 2 marks · official answer ready
(b) Describe the purpose of the algorithm. ........................................................................................................................................…
Programming concepts · 1 mark · official answer ready
(a) Write the pseudocode statement to declare the variable Saying .................................................................................................................…
Programming concepts · 5 marks · official answer ready
(b) Write the pseudocode statements to: • allow a string to be input to the variable Saying • store the content of the variable Saying in a text file named "Quotations.txt" • make…
Programming concepts · 4 marks · official answer ready
(ii) Explain how the program will use AI. .........................................................................................................................................…
Programming concepts · 1 mark · official answer ready
1 Tick (3) one box to show which word accurately describes the scope of a variable declared in a procedure. A Function B Global C Local D Subroutine [1]
Programming concepts · 4 marks · official answer ready
2 (a) Four descriptions and five pseudocode statements are shown. Draw one line to link each description to its most appropriate pseudocode statement. Not all pseudocode statement…
Programming concepts · 3 marks · official answer ready
(a) Write pseudocode statements to declare the variables X, Y and Z ...............................................................................................................…
Programming concepts · 6 marks · official answer ready
(b) The function Same(A,B) returns TRUE if the value of A is the same as the value of B when B is rounded to the nearest whole number and FALSE otherwise. Write pseudocode stateme…
Programming concepts · 1 mark · official answer ready
(c) State the difference between defining and calling a function. .................................................................................................................…
Programming concepts · 2 marks · official answer ready
(a) Give two ways that a user could check that a website uses the SSL protocol. 1 .................................................................................................…
Programming concepts · 5 marks · official answer ready
1 Five components are shown. Tick (✓) to show whether each component is an example of input, output or storage. Input Output Storage Component (✓) (✓) (✓) actuator register sensor…
