Shawlands Academy Computing Department

75
Shawlands Academy Computing Department Higher Computing Easter Study Class

description

Shawlands Academy Computing Department. Higher Computing Easter Study Class. Lesson Objectives. To examine the software development questions - from the past 5 years – which require coding / pseudocode to be written To practice answering questions which require coding to be written. - PowerPoint PPT Presentation

Transcript of Shawlands Academy Computing Department

Page 1: Shawlands Academy Computing Department

Shawlands AcademyComputing Department

Higher ComputingEaster Study Class

Page 2: Shawlands Academy Computing Department

Lesson Objectives

• To examine the software development questions - from the past 5 years – which require coding / pseudocode to be written

• To practice answering questions which require coding to be written

Page 3: Shawlands Academy Computing Department

Questions

• 2009 – Section 1 Q 12• 2009 – Section II Q 23• 2008 Section 1 Q 11• 2008 section 1 Q 12• 2008 section II Q16• 2011 section I Q10• 2011 section I Q11

• 2007 section 1 Q 14• 2007 section 1 Q 16• 2007 Section II Q20• 2010 Section 1 Q9• 2010 Section II Q 16• 2010 Section II Q 17• 2011 Section II Q15• 2011 Section II Q16

Page 4: Shawlands Academy Computing Department

2009 – Section 1 Q 12

• A program is being designed which generates a username using the following steps:– 1. get user initial and surname– 2. create username– 3. display the username

(a) Show how these steps could be represented using a graphical design notation.

Page 5: Shawlands Academy Computing Department

Generate User Name

get initial and surname

Create User Name

Display User Name

2 marksWARNING!!!!

Don’t confuse structure diagrams (design stage) with data flow diagrams (analysis stage)

ProcessInputs Output

Page 6: Shawlands Academy Computing Department

2009 – Section 1 Q 12

(b) The username is created by joining the initial to the end of the surname,

for example “CarrickE”.Name the string operation used to create the

username.

Concatenation (1 mark)

Page 7: Shawlands Academy Computing Department

2009 – Section II Q 23

A cinema ticket system allows customers to select and pay for their own tickets.

The top level algorithm is:1. Get ticket details2. Calculate cost3. Display cost and accept payment

Page 8: Shawlands Academy Computing Department

The module CalculateCost uses the number of tickets and the category of ticket to calculate the total payment due. It uses the parameters describedbelow.

Page 9: Shawlands Academy Computing Department

(a) State the most suitable data type for the parameter called Cost.

Real/single/currency (1 mark)Note: Integer is incorrect as cost is a decimal value.

Page 10: Shawlands Academy Computing Department

(b) Parameters can either be passed by value or by reference.(i)Identify one parameter that is passed by value to the module CalculateCost. Justify your answer.

•Amount or category (1 mark)•not to be changed by this module, so only current value passed in (1 mark)

Page 11: Shawlands Academy Computing Department

Parameters can either be passed by value or by reference.ii.Identify one parameter that is passed by reference to the module CalculateCost. Justify your answer.•Cost (1 mark)•This is calculated by the module and updated, the updated variable is passed back out (1 mark)

Page 12: Shawlands Academy Computing Department

(c) A program may use local variables and global variables.(i) What is the scope of a global variable?

A global variable can be used throughout the whole program - not restricted to any one subprogram (1 mark)

Page 13: Shawlands Academy Computing Department

2 from:•Increases modularity, reducing unexpected clashes between variable names•Increases portability, can re-use modules without changing variable names•Makes data flow clear, so improving readability / maintainablity(2 marks)

(ii) State two advantages of using parameter passing rather than global variables when programming.

Page 14: Shawlands Academy Computing Department

Greater range of hardware platforms means:• the larger the potential sales market• less risk of potential hardware/software conflicts• more able to deal with future upgrades by/for customers(1 mark)

(d) State one reason why portability of software is an important factor for developers to consider..

Page 15: Shawlands Academy Computing Department

(e) To calculate the total cost, the program must check the category of each ticket against the four possible categories. The programmer could use a series of IF statements or a nested IF as shown below.Series of IF statements:

IF category = ‘adult’ THEN Price=5.50IF category = ‘child’ THEN Price=3.50IF category = ‘student’ THEN Price=4.50IF category = ‘OAP’ THEN Price=4.00

Nested IF:If category = ‘adult’ THENPrice=5.50ELSE IF category = ‘child’ THENPrice=3.50ELSE IF category = ‘student’ THENPrice=4.50ELSE IF category = ‘OAP’ THENPrice=4.00END IF

(i) The programmer decides to use a nested IF. Explain why this is amore efficient method.

Each separate IF in the series will be checked even after the match is found (1 mark)Nested if will only be executed until a condition is true (then it will exit the statement) (1 mark)

Page 16: Shawlands Academy Computing Department

(ii) State one other multiple outcome selection statement that the programmer could have used.

CASE statement (1 mark)

(f) The program will make use of a 1-D array.

(i) When creating, or declaring, a 1-D array for use in a program, a name must be given to the array.State two other items that should be specified when the array is created.

•Data type•Number of elements/size of array (2 marks)

Page 17: Shawlands Academy Computing Department

(ii) Explain why it is a more efficient use of system resources to pass an array by reference rather than by value.

1 from:•Does not take up memory (1 mark) storing a second copy of the array (1 mark)OR•Does not waste processor time (1 mark) making a second copy of the array (1 mark)

You should know that when a parameter is passed by vale, the subroutine make a copy of the variable – which has to be stored in RAM

Page 18: Shawlands Academy Computing Department

2008 Section 1 Q 11A holiday booking website includes a currency converter which asks for the amount in pounds sterling and converts it to Euros. Here is the top-level algorithm, including data flow for steps 1 and 2.

1. get amount of pounds (out: pounds)2. calculate euros (in: pounds out: euros)3. display conversion ..................................

(a) State which design notation is being used.

Pseudocode (1 mark)

Page 19: Shawlands Academy Computing Department

1. get amount of pounds (out: pounds)2. calculate euros (in: pounds out: euros)3. display conversion ..................................

(b) Step 3 results in the following being displayed on screen:

State the data flow for step 3.

£500 converts to €600.

In: pounds In: euros (1 mark for each correct parameter)

Page 20: Shawlands Academy Computing Department

c) Identify whether the pounds variable in step 1 should be passed by value or passed by reference. Explain your answer.

By reference (1 mark) • the dataflow states that it is an out parameter (1 mark)

Page 21: Shawlands Academy Computing Department

2008 section 1 Q 12

12. Explain the purpose of a CASE statement in a high level language.

2 from :•Performs decision or selection • Involving two or more choices • Avoids the use of multiple or nested If statements • Increases clarity/readability

1 mark for each of two bullet points

Page 22: Shawlands Academy Computing Department

2008 section II Q16An international athletics competition between eight countries has a number of events. Here are the results for one race.

The stadium’s computer system has a program which processes and displaysthe results.(a) State two system requirements that would have been specified for theinstallation of the program.

Page 23: Shawlands Academy Computing Department

• 2 from• Amount of (available) RAM/memory • Minimum clock speed/powerful processor • Processor type • Version of OS • Identify peripherals required. • Sufficient storage capacity (2 marks)

Page 24: Shawlands Academy Computing Department

(b) The program is modular. State two benefits of creating modular code.

2 from: •Sections of code can be assigned to different programmers • Modules can be tested individually • Easier maintenance as more readable • Availability of module library • Individual modules can be amended/replaced(2 marks)

Page 25: Shawlands Academy Computing Department

(c) At the end of a race, messages are displayed. For example:

The winning country for a race is stored in a string variable called winner.Using code from a programming environment with which you are familiar, show how to extract the first three characters from the variable winner.

left(winner,3) OR winner[1:3]

1 mark for a correct function, 1 mark for correct range

Page 26: Shawlands Academy Computing Department

(d) The program stores the list of race times in a single data structure.(i) State the data structure and data type used to store the race times.

array (1 mark) of real/single (1 mark)

Page 27: Shawlands Academy Computing Department

(ii) The program must find the fastest time for a race. Use pseudocode to design an algorithm to find the fastest time

Set fastest to 1st item in array (1 mark) FOR index = 1 to 8 [for all array items] (1 mark, as long as loop is ended with next) If array(index)<fastest then (1 mark, as long as end if is used) Set fastest to array(index) (1 mark) End if End loop (4 marks )

Page 28: Shawlands Academy Computing Department

(iii) It is suggested that it would be preferable for the algorithm to find the lane number of the fastest time rather than the fastest time.Explain how this could be achieved.

After the line “Set fastest to array(index) “ add “set position to index”

Page 29: Shawlands Academy Computing Department

2007 section 1 Q 14Programmers make use of different types of variables including Boolean.(a)Describe what is meant by a “Boolean” variable.

A variable which holds only 2 values, usually true or false ( 1 mark)

(b) Describe, using pseudocode, how a Boolean variable would be used.if item(index) = target then found = true (1 mark)

Page 30: Shawlands Academy Computing Department

2007 section 1 Q 16The string variable forename contains “Kathryn” and the variable surname contains “Barr”. The variable username is assigned the value “KatBar”using the first three characters of each name:

Use a language of your choice to show how substrings and concatenation would be used to assign the value “KatBar” to the variable username.

Page 31: Shawlands Academy Computing Department

Use a language of your choice to show how substrings and concatenation would be used to assign the value “KatBar” to the variable username.

The answer in Visual Basic would be LET username = mid(forename, 1,3)& mid(surname, 1,3) OR left(forename,3)&left(surname,3)

1 mark for assignment1 mark for concatenation, symbol (&)1 mark for both substrings in correct order

Page 32: Shawlands Academy Computing Department

2007 Section II Q20Scientists are interested in studying the possible effects of global warming.Devices are placed at various locations to record temperatures. Each device takes one thousand temperature readings per day. Sample readings are shown below:

Page 33: Shawlands Academy Computing Department

A program has been written to perform some analysis on the data collected.(a) The temperature readings are stored in a 1-D array.(i)What is meant by a 1-D array?

• List (1 mark)• Of items of the same data type

(ii) Which data type is suitable for the array?•Real, single (“number” not aceptable )•Note: Integers are not suitable(1 mark)

Page 34: Shawlands Academy Computing Department

(b) The program must find how many of the 1000 readings are above zero and less than ten degrees. Use pseudocode to write an algorithm which would determine the number of readings in this range.

set occurrences to 0 (1 mark)For counter = 1 to 1000(or for each item) (1 mark loop with termination)if temp(counter ) > 0 and temp(counter ) <10 then 2 marksAdd 1 to occurrences 1 markend ifNext

Page 35: Shawlands Academy Computing Department

2010 Section I Q9Most high level languages have several data types available a)State what is meant by a real variable.

A number with fractional part/floating point number/decimal number (1 mark)

Page 36: Shawlands Academy Computing Department

b) State the most suitable data structure and data type for storing the list called “valid” in the pseudocode shown below.

For each member of listIf gender(current) = “M” or gender(current) = “F” Then

Set valid(current) to trueElse

Set valid(current) to falseEnd If

End fixed loop

Array (1 mark) of boolean (1 mark).

Page 37: Shawlands Academy Computing Department

Mrs Laird sets her Higher Computing class the task of writing a program that will take in three items – day, month and year. These three variables will have the same data type. The program will then output a “DateofBirth” variable with six characters, as shown below.

a) State the only data type that the pupils can use for all three of the “day”,“month” and “year” variables. Justify your answer.

2010 Section II Q16

Page 38: Shawlands Academy Computing Department

String (1 mark) • “Jun” is text and must be a string • Number data types cannot accept text, text data types will accept numbers • String operations are to be carried out

1 mark for any bullet point

a) State the only data type that the pupils can use for all three of the “day”,“month” and “year” variables. Justify your answer.

Page 39: Shawlands Academy Computing Department

b) Name the operation used to extract the last two characters from the contents of the “year” variable.

Substring (1 mark)

Page 40: Shawlands Academy Computing Department

c) Part of the program will take the contents of month e.g. “Jun” and turn this into the corresponding two character value for that month e.g. “06”.

Mrs Laird tells the pupils they must not use IF statements to implement thispart of the program.

Use pseudocode to design an algorithm for this part of the program. You should show only the first two months in your algorithm.

Page 41: Shawlands Academy Computing Department

Case month ofWhen “Jan”

Set month to “01”When “Feb”

Set month to “02”

CASE must be used as the question clearly states that “IF” is not to be used.

1 mark Case statement, 1 mark for two conditions, 1 mark for both text results.

Page 42: Shawlands Academy Computing Department

d) Name the operation used to join the three values together to produce the six characters for “DateofBirth”.

Concatenation (1 mark)

e) The contents of the “DateofBirth” variable are to be held in memory in ASCII format. Calculate the minimum amount of memory required to store the contents of this variable.

8 bits per character (1 mark) = 8 * 6 = 48 bits or 6 bytes (1 mark)

Page 43: Shawlands Academy Computing Department

f) The pupils are using a procedural language to write their programs.

(i) State two features of procedural languages.

• Follows a sequence of instructions/defined start and end point • Use of subprograms/functions • Range of variable types • Program control using repetition and selection structures • Uses arithmetical and logical functions

Simplistic answers like needs to be translated, use of arrays, variables are not acceptable at this level. 1 mark for any valid, max of 2 marks

Page 44: Shawlands Academy Computing Department

f) The pupils are using a procedural language to write their programs.

(ii) State one feature of event-driven languages that is not commonly found in procedural languages. .

• Code activated/order of execution assigned to particular user action eg clicking on button • Routines/code for handling events • Predefined routines for the creation of buttons/windows/forms/etc

“No start and end point” without qualification insufficient on its own. 1 mark for any one valid.

Page 45: Shawlands Academy Computing Department

g) Mrs Laird tells the pupils that their programs must be easily maintainable.Describe two characteristics of a program that make it easily “maintainable”.

• Comment lines/internal documentation to describe code • Capitalise/highlight/embolden keywords to increase readability • Indentation/blank lines/white space to increase readability • Meaningful variable/subroutine/function names describes function of code • Modular code/use of procedures/functions • Use of parameter passing • Use of local variables

1 mark for each of two valid points, max of 2 marks Note: “Readable code” on its own is insufficient.

Page 46: Shawlands Academy Computing Department

h)Mrs Laird also tells the pupils that they must avoid the use of global variables in their programs where possible.

(i) State the meaning of the term “global variable”.

A variable that can be used/accessed/updated anywhere in a program (1 mark).

Page 47: Shawlands Academy Computing Department

(ii) Explain why the pupils have been asked to avoid the unnecessary use of global variables when programming.

• Unexpected changes to variables (1 mark) caused by variables with the same name interacting (1 mark) • Data flow is unclear (1 mark) which reduces readability (1 mark) • RAM assigned to local variables is reused (1 mark), so more efficient use of memory (1 mark) 1 mark for each part of any one bullet point, max of 2 marks

Page 48: Shawlands Academy Computing Department

2010 Section II Q 17Henry works for a company that maintains office buildings. He decides to write a program to print labels for the room keys in a new office block. The block has 38 floors, each with 25 rooms. The label will consist of the floor number and the room number. The design for the program is shown below alongside a sample section of output.

Page 49: Shawlands Academy Computing Department

a) Once the program has been written it must be translated. Describe clearly why using a compiler to translate the code produced from this algorithm would be more efficient in terms of processor usage than using an interpreter to translate the same code.

• Interpreter will translate the contents of the loops every time they are carried out • Compiler will translate the contents of the loops once only • Saving processor time by reducing the number of translations

1 mark for any two bullets. Accept other wording, but answer must relate to context for full marks.

Page 50: Shawlands Academy Computing Department

b) State one example of how text output from a program could be formatted.

Font, size, style, colour, columns/table/tab, alignment 1 mark for any valid response. c)The company decide to include Henry’s code as a new function in theirbuilding management software.State the type of maintenance being carried out on the building management software by adding this section of code as a subprogram.

Perfective (1 mark).

Page 51: Shawlands Academy Computing Department

d) In order for Henry’s program to operate correctly for any office building two parameters would have to be passed to it.(i) State what these two parameters would be.

• Number of floors in the building (1 mark) • Number of rooms on each floor (1 mark) Accept possible names of parameters, such as floors or no_of_rooms etc but NOT floor_no or room_no

Page 52: Shawlands Academy Computing Department

(ii) State whether these parameters would be passed to the subprogram by value or by reference. Justify your answer.

• Passed by value (1 mark) • The subprogram only needs to use these values, it should not change them (1 mark)

Page 53: Shawlands Academy Computing Department

e) Another subprogram in the building management software is used to find therange of temperatures in a building in one day. The temperature is recorded every 15 minutes within a 24 hour period and stored in a list.

Use pseudocode to design one algorithm to find both the highest and lowest temperatures in this list.

Page 54: Shawlands Academy Computing Department

Set min to first temp in array Set max to first temp in array

1 mark for initialising both min and max to suitable values

For counter = 1 to no_in_list 1 mark for loop with termination

If temp(counter) > max then 1 mark for if…endif with correct max condition

Set max to temp(counter)End if

If temp(counter) <min then Set min to temp(counter) End If

1 mark for if…endif with correct min condition

Next counter 1 mark for assignment to both min and max

Page 55: Shawlands Academy Computing Department

2011 Q10Software is usually written using subprograms. Two types of

subprogram are procedures and functions. a) State how the use of subprograms increases the maintainability

of a program.

• Sections/subprograms are easily identified/implemented/tested/de-bugged/edited

• Sections/subprograms increase readability • Independent subprograms can be added or removed easily

1 mark

Page 56: Shawlands Academy Computing Department

2011 Q10(continued)

b) Readability of code affects maintainability. Other than using subprograms, state one way to improve readability of code.

• Internal Commentary• Meaningful variable names• Effective use of white space/indentation/blank

lines1 mark

Page 57: Shawlands Academy Computing Department

2011 Q10(continued)

c) Explain one difference between a procedure and a function.

• A function can only return a single value (1 mark). A procedure can return any number of values (1 mark)

• The value of a function can be assigned to a variable (1 mark) a procedure has no value (1 mark)

1 mark for each part of any valid comparison/difference, max of 2 marks.

Page 58: Shawlands Academy Computing Department

2011 Q11A program contains three variables, of the same type,

with the following values.

variable1 variable2 variable3

8 4 84

The program is written in language called SQAM. It contains the line of code shown below. The symbol ?? represents a particular operation.

variable3 = variable1 ?? variable2

Page 59: Shawlands Academy Computing Department

2011 Q11(continued)variable1 variable2 variable3

8 4 84

variable3 = variable1 ?? variable2

a) The value 84 is assigned to variable3. State the single common operation carried out by the ? symbol.

Concatenation (accept „&‟) (1 mark)b) State the data type that must have been used for all

three of the variables. String (1 mark)

Page 60: Shawlands Academy Computing Department

2011 Section 11 Q15

RightIT, a software company, is currently developing a cash machine program for a bank. The cash machine will offer five options to customers.

Page 61: Shawlands Academy Computing Department

a)RightIT decided to use an event-driven programming language to write the software.State two reasons why an event-driven programming language is suitable for this software. 1 from:•Code is attached to on-screen events eg buttons/Events trigger the code•Can create GUI easily•Flow of control is determined by user actions•1 mark each max of 2 marks.

Page 62: Shawlands Academy Computing Department

b) (i) State one other type of programming language RightIT could have used for this software.•Procedural (1 mark). •Note: scripting or declarative are generally not suitable for this task.

(ii) Justify why it would also have been suitable•Use of subprograms, one for each service on offer•sequence – to go through initial identification procedure, and selection – to carry out chosen service•Range of data types are available•1 mark for 1 reason.

Page 63: Shawlands Academy Computing Department

c) The options selected during a day are stored in a list. The bank would like the software to calculate the number of times the mobile top-up option appears on this list. Use pseudocode to design an algorithm to carry out this calculation.

Total=0For each option() chosen that dayIf option(current) = mobile top-up then add 1 to totalend ifnext transaction

1 mark for initialising1 mark loop with termination1 mark if...end if with correct condition1 mark assignment

Note: End If is unnecessary if the IF line is all on one line or if indentation makes it clear that the IF is terminated

Page 64: Shawlands Academy Computing Department

d) Once the software has been written RightIT carry out systematic testing.Explain how systematic testing is carried out.

2 from:•Testing is planned in advance / creation of a test table•followed in a logical order•Involves testing of subprograms/subroutines/components/modules/programs individually and together•2 marks

Page 65: Shawlands Academy Computing Department

e) The bank is anxious that RightIT also carries out comprehensive testing on the software.State what is meant by comprehensive testing.

1 from;•Testing is as thorough as possible (1 mark)• Covers a wide/full range of possibilities (1 mark)•Data should in range, out of range and boundary data (1 mark)

Page 66: Shawlands Academy Computing Department

f) The final version of the software is ready to be distributed to the bank. A compiler is chosen as the most suitable translator. Explain why a compiler is suitable at this stage.

• Compiled version of code can be saved (1 mark), no need for translation every time program is run (1 mark)

• Will not be translated each time program is run (1 mark), more processor efficient (1 mark)

• Translator software not required (1 mark), more memory efficient (1 mark)

• Compiled version is saved (1 mark) details of code are protected from theft/alteration/copying (1 mark)

Page 67: Shawlands Academy Computing Department

g) Several months after the software has been in use, the bank asks RightIT to include another option in the menu. This option should allow customers to withdraw cash in Euros.Name the type of maintenance required and justify your answer.

• Perfective(1 mark), • A new feature is being added that was not originally

required (1 mark)

Page 68: Shawlands Academy Computing Department

2011 Q16Sidney is an experienced programmer. He decides to write a book called “The Good Programming Guide”.a) Chapter One of the book is entitled “Characteristics of a well written program”.Two characteristics of a well written program are reliability and efficiency. (i)Define the term “reliable”. •Software performs as predicted on duplicated test runs•Software will not stop due to design flaws•Output is correct for all specified inputs

•1 mark for 1 valid point.

Page 69: Shawlands Academy Computing Department

(ii) Explain one way in which a program can be written to make it efficient in terms of processor usage. 1 from;•No unnecessary code is included in the program (1 mark), processor not required to carry out unnecessary commands(1 mark)•Minimise the number of disk accesses/peripherals (1 mark), reducing time processor will have to stand idle (1 mark) •Simple user interface (1 mark) as complex interfaces take some time to draw etc (1 mark)•Use of Nested IFs/Case statements (1 mark) to logically structure code to avoid testing unnecessary conditions (1 mark•Must give an example along with an explanation

Page 70: Shawlands Academy Computing Department

b) A well written program should make use of parameter passing.

(i)State the purpose of an in parameter.

• Current value (of variable) passed into a subprogram for use

• To allow data to be passed by value• Protect (original value of) variable from change by

subprogram 1 mark for 1 of above

Page 71: Shawlands Academy Computing Department

b) A well written program should make use of parameter passing.

(ii) State the purpose of an out parameter.

• Data/variables (created within procedure and only) passed out of a subprogram)

• Brand new variable is passed out of subprogram• Value of a variable changes and passed out of

subprogram 1 mark for 1 of above

Page 72: Shawlands Academy Computing Department

c) Chapter two of the book is entitled “Being a team player‟.Sidney is keen to emphasise that on most projects there will be a team of programmers writing the software. Describe one example of how a programming team can ensure they will work together effectively.

• Programmers will each be writing individual subprograms for the software required, (1 mark) reducing implementation time OR so they must collaborate via meetings/project manager/detailed plan (1 mark)

• Will discuss how to implement the design/get help from more experienced programmer/discuss testing (1 mark) to reduce time wasted/find and solve problems earlier/ensure testing is systematic and comprehensive (1 mark)

• Any other valid technique/topic (1 mark) and description (1 mark)

•  1 mark for any valid technique/topic, 1 mark for how it makes them effective.  

Page 73: Shawlands Academy Computing Department

d) Another chapter is entitled “Saving time whilst programming‟ A module library will save programmers time as they will not have to code or test these modules independently. State one further benefit of making use of a module library.

• Can carry out a complex operation that they could not write themselves

• Do not have to design the solution to the sub problem 1 mark

Page 74: Shawlands Academy Computing Department

e) When working with data, the use of 1-D arrays can save time

(i) . State two characteristics of a 1-D array.

2 from;•a list of data/(fixed) number of items•items are the same data type/array has a single data type• position of data identified by its position/index/element/subscript

2 marks(ii) Data can be stored using individual variables or using a 1-D array.Describe how the use of a 1-D array can save time when writing a program compared to several individual variables.

• Parameter passing list will use one array (1mark) rather than a list of variables (1 mark)

• Do not need to write a line of code to manipulate each data item individually, (1 mark) operation can be performed on each item in the array using a loop (1 mark)

• 2 marks for full description of one point.

Page 75: Shawlands Academy Computing Department

f) Sidney sets a short programming challenge at the end of each chapter.One of these programs involves identifying a computing term from another computing related word. For example, “ram” from “program” Using code from a programming environment with which you are familiar, show how you would extract the term “ram” from “program”, when “program” has been assigned to the variable called “word”.

right(word,3)OR mid(word,5,3)

1 mark for use of substring operation, 1 mark for correct selection of letters.

word

program